使用多用户登录可能遇到Argument 1 passed to Illuminate\Auth\EloquentUserProvider::validateCredentia...的错误,那么,如何实现多用户登录呢?
首先,进入/config/auth.php
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web', //默认的Auth方式
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication gua

在Laravel中实现多用户登录时,遇到 Argument 1 passed to IlluminateAuthEloquentUserProvider::validateCredentials() 的错误。解决方法包括修改/config/auth.php配置,并通过php artisan make:model创建新的用户模型。完成这些步骤后,使用Auth::guard('add')即可进行新角色的验证。
最低0.47元/天 解锁文章
259

被折叠的 条评论
为什么被折叠?



