I want to have register / login and send password reset on the same page.
I achieve to have register and login on the same page with different input name. But I don't find a way to add password reset input.
I want to call it "reset_email" but on my controller, if I try :
public function sendResetLinkEmail(Request $request)
{
$this->validateEmail($request);
// We will send the password reset link to this user. Once we have attempted
// to send the link, we will examine the response then see the message we
// need to show to the user. Finally, we'll send out a proper response.
$response = $this->broker()->sendResetLink(
$request->only('email')
);
return $response == Password::RESET_LINK_SENT
? $this->sendResetLinkResponse($response)
: $this->sendResetLinkFailedResponse($request, $response);
}
/**
* Validate the email for the given request.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function validateEmail(Request $request)
{
$this->validate($request, ['reset_email' => 'required|email']);
}
I've got this error :
We can't find a user with that e-mail address.
Any idea how to use reset_email instead of email for my input name ?
Thank for your help.