From aa192d342d964c183da9a4c0848ebc97bc4bef88 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 16 Jun 2019 18:02:11 -0600 Subject: [PATCH] Fixes #1407 --- app/Http/Controllers/Settings/HomeSettings.php | 3 ++- resources/views/settings/template.blade.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Settings/HomeSettings.php b/app/Http/Controllers/Settings/HomeSettings.php index a996a854..efe51758 100644 --- a/app/Http/Controllers/Settings/HomeSettings.php +++ b/app/Http/Controllers/Settings/HomeSettings.php @@ -147,9 +147,10 @@ trait HomeSettings $log->save(); return redirect('/settings/home')->with('status', 'Password successfully updated!'); + } else { + return redirect()->back()->with('error', 'There was an error with your request! Please try again.'); } - return redirect('/settings/home')->with('error', 'There was an error with your request!'); } public function email() diff --git a/resources/views/settings/template.blade.php b/resources/views/settings/template.blade.php index 19656b27..ea84bad3 100644 --- a/resources/views/settings/template.blade.php +++ b/resources/views/settings/template.blade.php @@ -13,6 +13,11 @@ @endforeach @endif +@if (session('error')) +
+ {{ session('error') }} +
+@endif