How to Write Code for Disable Forgot Password in Laravel 7

How to Write Code for Disable Forgot Password in Laravel 7
1. Simple Method :
Auth::routes(['reset' => false]);

2. If that doesnt work, in ForgotPasswordController, you will see that a trait
SendsPasswordResetEmails is used, in that you will find the function
showLinkRequestForm which you can override:

public function showLinkRequestForm()
{
return view('auth.passwords.email');
}

and replace it with a redirect to go back, or a 404, or something else that you
want.

Leave a Comment