I want to redirect the user to the edit.blade page when they login for the first time. for this I made an if else statement, but it doesn't work and i have no idea what the problem is. Can someone help me.
this is the code that i have now:
// This section is the only change
if ($this->guard()->validate($this->credentials($request))) {
$user = $this->guard()->getLastAttempted();
dd($user);
// Make sure the user is active
if ($user->verified && $this->attemptLogin($request)) {
if ($user->first_time_login == true || $user->first_time_login == 1) {
$this->redirectTo = '/users/edit';
$user->first_time_login = false;
$user->save();
}
return $this->sendLoginResponse($request);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire