Laravel说未定义Authguard []

编程入门 行业动态 更新时间:2024-10-10 12:26:54
本文介绍了Laravel说未定义Authguard []的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是一个初学者,我开始使用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', ]);

现在输入以下内容: localhost:8888/auth/login 我收到错误消息:

and now when I type: 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.

github/laravel/laravel/blob/v5.2.0 /config/auth.php

更多推荐

Laravel说未定义Authguard []

本文发布于:2023-11-28 00:04:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1640155.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:未定义   Laravel   Authguard

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!