The problem of determining the jump path according to the attributes of a user after laravel login

1. The problem may be extremely simple for you, but there"s nothing I can do about it.
2. There is a field in the user table that describes what type the user is. I want to determine the jump page
3 after the user logs in based on the contents of this field. May I ask how to change the default user authentication
4. Thank you. Thank you very much.


is very simple. Override the authenticated method in LoginController to

protected function authenticated(Request $request, $user)
{
    return $user->isVip?redirect('vip'):redirect('home');
}

if the front and rear ends are separated, the front end acquires the returned data and redirects according to the business (that is, your type)
if the balde template is used, change the return view ('name of the page you want to jump to')

.
Menu