I'm trying to make a multi-auth in Laravel 5.8, but I'm facing a problem. When I set a guard on my auth::attempt, login is done successfully, but auth::check and auth::user return false and null respectively.
It only works when I change default guard in my config/auth.php to my custom-guard.
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
To:
'defaults' => [
'guard' => 'clients',
'passwords' => 'users',
],
I'd like to use a lot of guards, not just one. And whenever I need to, return their data with Auth::user. How can I do that?