What type of user do I want to check when I log in If role is admin then redirect to admin page If role is users then redirect to home page
I using laravel/ui latest version
What type of user do I want to check when I log in If role is admin then redirect to admin page If role is users then redirect to home page
I using laravel/ui latest version
In
app\Http\Controllers\LoginController.phpyou can do something like this:Make sure you remove the line of:
protected $redirectTo = RouteServiceProvider::HOME;. In Laravel, you can either haveredirectTobe a variable OR a function, but not both. By making it a function, you can redirect the user where they need to go based on their role.