token = $token; } #[Layout('components.layouts.auth')] public function resetPassword() { $validated = $this->form->validate(); $status = Password::reset(array_merge($validated, ['token' => $this->token]), function (User $user, string $password) { $user->forceFill([ 'password' => Hash::make($password), ])->save(); }); if ($status === Password::PASSWORD_RESET) { //Mail::to($user->email)->send(new PasswordResetNewUser($user)); return redirect()->route('login'); } $this->addError('email', 'The provided credentials do not match our records.'); } public function render() { return view('pages.auth.reset-password'); } }