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