config/auth.php
<?php
return [
'defaults' => [
'guard' => 'user',
'passwords' => 'user',
],
'guards' => [
'user' => [
'driver' => 'session',
'provider' => 'user',
],
'admin' => [
'driver' => 'session',
'provider' => 'admin',
],
],
'providers' => [
'user' => [
'driver' => 'eloquent',
'model' => 'App\User',
],
'admin' => [
'driver' => 'eloquent',
'model' => 'App\Admin',
],
],
'passwords' => [
'user' => [
'provider' => 'user',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
],
'admin' => [
'provider' => 'admin',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
]
]
];
?>
routes.php
Route::get('/test1', function() {
return Auth::guard('admin');
});
Route::get('/test2', function() {
return Auth::guard('user');
});
and here's the error I'm getting
Missing argument 1 for Illuminate\Auth\AuthManager::createDriver(), called in C:\xampp\htdocs\storage\framework\compiled.php on line 11193 and defined
what's wrong ?
php artisan optimize
didn't work ... !? what does he mean when he says (Maybe just delete the file and thenartisan optimize
) ? - bobD