make(Hasher::class); // Verify password matches when changing password or email. if (!$hasher->check($this->input('current_password'), $this->user()->password)) { throw new InvalidPasswordProvidedException(trans('validation.internal.invalid_password')); } return true; } public function rules(): array { return [ 'password' => ['required', 'string', 'confirmed', 'min:8'], ]; } }