diff --git a/app/Http/Controllers/User/UserController.php b/app/Http/Controllers/User/UserController.php index cd5c596..e7e1d27 100644 --- a/app/Http/Controllers/User/UserController.php +++ b/app/Http/Controllers/User/UserController.php @@ -229,9 +229,17 @@ class UserController extends Controller /** * Show the change password form. */ - public function changePasswordForm(): View + public function changePasswordForm() { - return view('user.change_password'); + try { + return view('user.change_password'); + } catch (\Throwable $e) { + \Illuminate\Support\Facades\Log::error('Error rendering change_password view: ' . $e->getMessage()); + return response()->view('errors.500', [ + 'exception' => $e, + 'allowLogout' => true + ], 500); + } } /** diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php index 523febd..2f21518 100644 --- a/resources/views/errors/500.blade.php +++ b/resources/views/errors/500.blade.php @@ -14,10 +14,20 @@ @endsection @section('action') - + @auth +
+ @csrf + +
+ @else + + @endauth {{ __('errors.back_to_home') }}