0
votes

I am using laravel 5.8 auth classes in custom, I have created my custom forgot page and it sent email and I got email in mailtrap.io but when I click on Reset Password button it show an error Undefined variable: token (View: D:\xampp\htdocs\myclassicbook\resources\views\users\pages\reset.blade.php)

2
The message is pretty clear. Show us reset.blade.php, and where $token is defined and passed to the view in the controller.ceejayoz

2 Answers

0
votes

The email password reset route uses showResetForm method on ResetPasswordController.

public function showResetForm(Request $request, $token = null)
{
    return view('auth.passwords.reset')->with(
        ['token' => $token, 'email' => $request->email]
    );
}

It will help you

-1
votes

Please ensure that the following line exist in reset.blade.php <input type="hidden" name="token" value="{{ $token }}">

I hope it help you.