Laravel5.5 attempt 老是放回false


控制器代码
if ($this->guard('api')->attempt($credentials, $request->has('remember'))) {

}

配置的代码
'guards' => [

    'api' => [
        'driver' => 'passport',
        'provider' => 'users',
    ],
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],


    'admin' => [
        'driver' => 'session',
        'provider' => 'admins',
    ],
    'loginuser' => [
        'driver' => 'jwt',
        'provider' => 'homeuser',
    ],
],
模型代码
namespace Modules\User\Models;

use IlluminateNotificationsNotifiable;
use IlluminateFoundationAuthUser as Authenticatable;
use LaravelPassportHasApiTokens;
use IlluminateDatabaseEloquentSoftDeletes;
class User extends Authenticatable
{
·················
前几天用的还好好的,今天开始就登陆不了了、不知道是什么原因。
都检查了一遍没啥问题呀。


Vote Vote Cancel Collect Collect Cancel

<< 上一篇: 求教 laravel 基类中获取不到 session 问题

>> 下一篇: ViewComposers需要的where条件是个变量怎么办