V
V
Vova1357982022-03-24 22:50:23
Laravel
Vova135798, 2022-03-24 22:50:23

How to change the route for password recovery?

When recovering a password, an error occurs: Route [password.reset] not defined. As I understand it, this route is registered automatically, but it does not suit me. Can I change it to mine?

public function mail(Request $request){
        $request->validate([
            'email' => 'required|email'
        ]);

        $status = Password::sendResetLink($request->only('email'));

        return $status === Password::RESET_LINK_SENT ? back()->with(['status' => __($status)]) : back()->withErrors(['email' => __($status)]);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pLavrenov, 2022-03-26
@pLavrenov

Standard implementation here Http/Controllers/Auth/ResetPasswordController.php
Maybe showResetForm() was rewritten there because it has return view('auth.passwords.reset') (in standard)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question