未定义身份验证防护[供应商]

时间:2018-11-05 18:07:46

标签: php laravel laravel-5 reference ide

我使用过laravel 5.5 我的登录页面http://127.0.0.1:8000/vendor/login出错

InvalidArgumentException
Auth guard [vendor] is not defined.

我的错误

public function handle($request, Closure $next, $guard = null)
{
    if (Auth::guard($guard)->check()) {
        return redirect('/');
    }

    return $next($request);
}

我的AuthServiceProvider代码:

  class AuthServiceProvider extends ServiceProvider
    {
    protected $policies = [
        product::class =>productPolicy::class,
    ];

    public function boot()
    {
        $this->registerPolicies();
        Passport::routes();
        Passport::tokensExpireIn(now()->addDay(2));
    }
}

请帮助我

我的VendorLoginController.php

https://github.com/Tohidda/file/blob/master/VendorLoginController.php

和我的auth.php

https://github.com/Tohidda/file/blob/master/auth.php

和我的web.php

https://github.com/Tohidda/file/blob/master/web.php

0 个答案:

没有答案