laravel 8 user MustVerifyEmail code example
Example: verify type of account laravel
protected function authenticated(Request $request, User $user)
{
if ($user->admin()) {
// an admin
$redirect = '/admin';
} elseif ($user->manager()) {
// it's a manager
$redirect = '/manager/home';
} else {
// it's a user
$redirect = '/dashboard';
}
return redirect($redirect);
}