Laravel说未定义Authguard [] [英] Laravel say that Auth guard [] is not defined
问题描述
我是一个初学者,我开始使用laravel学习和编写代码... 为了启用用户登录和注册,我写了这个(就像我在一个教程上看到的那样):
I'm beginer and I start learn and code with laravel... To enable user login nad registration I write this (as I see on one tutorilal):
在routes.php
at routes.php
Route::controllers([
'auth'=>'Auth\AuthController',
'password'=>'Auth\PasswordController', ]);
现在输入以下内容: http://localhost:8888/auth/login 我收到错误消息:
and now when I type: http://localhost:8888/auth/login I get error:
AuthManager.php第71行中的InvalidArgumentException: 身份验证防护[]为 未定义.
InvalidArgumentException in AuthManager.php line 71: Auth guard [] is not defined.
view文件夹中也没有auth目录,login.blade.php文件和其他文件.
Also in view folder there is no auth directory and login.blade.php files and other.
推荐答案
如果从5.1.x升级到5.2,请确保已更新config/auth.php.
Make sure that your config/auth.php is updated if you've upgraded from 5.1.x to 5.2.
https://github.com/laravel/laravel/blob/v5.2.0 /config/auth.php
这篇关于Laravel说未定义Authguard []的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!