validate([ 'current_password' => ['required', 'string', 'current_password'], 'password' => ['required', 'string', Password::defaults(), 'confirmed'], ]); } catch (ValidationException $e) { $this->reset('current_password', 'password', 'password_confirmation'); throw $e; } auth()->user()->update([ 'password' => Hash::make($validated['password']), ]); Log::create([ 'user_id' => auth()->user()->id, 'loggable_type' => User::class, 'loggable_id' => auth()?->user()?->id, 'action' => LogAction::UPDATE, 'content' => 'User updated password', 'ip' => request()->ip(), ]); $this->reset('current_password', 'password', 'password_confirmation'); $this->dispatch('password-updated'); } }; ?>

{{ __('Update Password') }}

{{ __('Ensure your account is using a long, random password to stay secure.') }}

{{ __('Save') }} {{ __('Saved.') }}