Laravel 5.3 web guard允许登录,但admin guard不允许登录

时间:2016-12-21 09:30:06

标签: php laravel laravel-5.3

auth.php

'guards' => [
    'web' => [
        'driver' => 'session',
        'provider' => 'users',
    ],

    'admin' => [
        'driver' => 'session',
        'provider' => 'admins',
    ],

    'api' => [
        'driver' => 'token',
        'provider' => 'users',
    ],
],

/ * Foundation-Auth * /

laravel中的AuthenticateUsers.php-> foundation / auth

return $this->guard('admin')->attempt(
        $this->credentials($request), $request->has('remember')
    );

0 个答案:

没有答案