the password recovery email in laravel is not sent to the user and this is my function in controller :
public function recover(Request $request)
{
$validator = Validator::make($request->only('email'), [
'email' => 'required'
]);
if($validator->fails()) {
throw new ValidationHttpException($validator->errors()->all());
}
$response = Password::sendResetLink($request->only('email'), function (Message $message) {
$message->subject(Config::get('boilerplate.recovery_email_subject'));
});
switch ($response) {
case Password::RESET_LINK_SENT:
// return $this->response->noContent();
return response()->json(['success' => true, 'data' => $response], 200);
case Password::INVALID_USER:
// return $this->response->errorNotFound();
return response()->json(['success' => false, 'data' => $response], 200);
}
}
and I configure my .env and mail.php I use laravel 5.6
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire