I\'m working on my Laravel Project and trying to override the default postLogin() from AuthenticatesAndRegistersUsers . So I have updated my AuthController and added this t
Try following this discussion at laracasts.
Here is a solution
if ($this->guard()->validate($this->credentials($request))) {
$user = $this->guard()->getLastAttempted();
if ($user->is_activated && $this->attemptLogin($request)) {
return $this->sendLoginResponse($request);
} else {
$this->incrementLoginAttempts($request);
if ($request->ajax()) {
return response()->json([
'error' => 'This account is not activated.'
], 401);
}
}
}
It provided a crucial update for a do my homework service at Top Homework Expert