laravel 5.6多身份验证问题

时间:2018-09-07 08:48:39

标签: php laravel authentication

在我的项目中进行多重身份验证后,我遇到了异常:

  

传递给Illuminate \ Auth \ SessionGuard :: __ construct()的参数2必须是Illuminate \ Contracts \ Auth \ UserProvider的实例,给定为null,在D:\ xaamp \ htdocs \ laravelapi \ vendor \ laravel \ framework \中调用src \ Illuminate \ Auth \ AuthManager.php

这是一张图片:

exception error

我不明白,请帮助,谢谢。

这是auth.php配置文件

    'defaults' => [
    'guard' => 'web',
    'passwords' => 'user',
], 'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
    ],
    'admin' => [
        'driver' => 'session',
        'provider' => 'admins',
    ],
    'library' => [
        'driver' => 'session',
        'provider' => 'libraries',
    ],

],'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\User::class,
    ],
    'admins' => [
        'driver' => 'eloquent',
        'model' => App\Admin::class,
    ],
    'libraries' => [
        'driver' => 'eloquent',
        'model' => App\Library::class,
    ],

我为每个后卫做了loginController和登录视图

0 个答案:

没有答案