The error is
InvalidArgumentException …\vendor\laravel\framework\src\Illuminate\Auth\CreatesUserProviders.php42
config/auth.php
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
'admin' => [
'driver' => 'session',
'provider' => 'adminss',
],
],
Here's my provider array
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
'admins' => [
'drivers' => 'eloquent',
'model' => App\Admin::class,
],
],
This is my Admin model
class Admin extends Authenticatable
{
use Notifiable;
protected $guard = 'admin';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
protected $table = 'admins';
}
This worked in laravel 5.4 but I'm getting error in 5.5
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire