Я хочу, чтобы заблокированный пользователь не мог выполнить ссылку сброса пароля, получил сообщение об ошибке и был перенаправлен на страницу. Если пользователь заблокирован, в таблице пользователя сохраняется 2, активный. Как я могу это сделать?
Я нашел этот код от laravel:
/**
* Send a reset link to the given user.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
*/
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);
}
if($user->active == 2) redirect('some_view_page')->with('fail', 'Sorry, your account is blocked');
- person rkj   schedule 17.07.2018$user->active == 2
, а затем перенаправляйте с сообщением. - person rkj   schedule 17.07.2018