I changed the default guard to something like below
auth.php
'defaults' => [
'guard' => 'employee',
'passwords' => 'users',
],
'guards' => [
'employee' => [
'driver' => 'session',
'provider' => 'employees',
],
],
'providers' => [
'employees' => [
'driver' => 'eloquent',
'model' => App\Employee::class,
],
],
However, I can't get the current login user from this Auth facade Auth::guard('employee')->user()
this returns an empty result.
But the user login work successfully Auth::attempt(['email' => $request->email, 'password' => $request->password, 'status' => 1])
I really appreciate your help.
Thanks