【发布时间】:2018-07-29 08:11:12
【问题描述】:
我全新安装了 laravel 5.3,每次使用路由时都会出现此错误。 “RouteCollection.php 第 161 行中的 NotFoundHttpException”在......
我使用了 php artisan make:auth 并创建了登录和注册。但仍然无法正常工作(在 laravel 5.3 中)。
之后我将 xampp 更新到最新版本并安装了 laravel 5.4, 现在我收到了相同的错误消息,但有不同的行,“179”
这是我的路线文件
Route::get('/', function () {
return view('welcome');
});
Route::get('/chat', function () {
return view('chat');
});
我在 view/chat.blade.php 中有一个视图
--------+----------+----------+------+---------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+----------+------+---------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|HEAD | chat | | Closure | web |
+--------+----------+----------+------+---------+--------------+
我可能错过了什么。 谁能解释一下,谢谢
【问题讨论】:
-
什么是给你错误的 url??
-
检查您的 .htaccess 文件并添加重写规则。如果您是 linux 用户,请点击此链接 digitalocean.com/community/tutorials/…
-
首先 php artisan route:clear 然后添加 Auth::routes();到你的 web.php
-
尝试过的路由:清除然后添加 Auth::routes();已经没有任何效果了!
-
@Sohel0415 /聊天
标签: laravel laravel-5.3 laravel-5.4