validate(); $status = Password::reset( [ 'email' => $this->email, 'token' => $this->token, 'password' => $this->password, 'password_confirmation' => $this->password_confirmation, ], function (User $user, string $password) { $user->forceFill(['password' => Hash::make($password)])->setRememberToken(Str::random(60)); $user->save(); event(new PasswordReset($user)); } ); if ($status === Password::PASSWORD_RESET) { Session::flash('toast', ['type' => 'success', 'message' => __($status)]); $this->redirectRoute('login', navigate: true); } else { throw ValidationException::withMessages(['email' => __($status)]); } } }