Laravel 5.4中RouteCollection.php(第179行)中的NotFoundHttpException [英] NotFoundHttpException in RouteCollection.php (line 179) in Laravel 5.4
问题描述
您好,当我访问 /登录 或 /注册 时,我遇到 NotFoundHttpException 错误强> 当我运行php artisan make:auth命令时,也会创建路由,但是 /login 或 /register >不适用于我,让我与您分享我的代码.
Hello I am facing NotFoundHttpException error when i access /login or /register when i run the php artisan make:auth command, routes are also created their, but /login or /register is not working for me, let me share my code with you.
Web.php
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
当我检查自己的浏览器时,其显示此错误
when i check my browers concole its showing this error
获取 http://localhost/laravel5authprc/login 404(未找到)
GET http://localhost/laravel5authprc/login 404 (Not Found)
推荐答案
尝试访问http://localhost/laravel5authprc/index.php/login
如果可行,则需要在apache vHosts文件中设置虚拟主机
Try to access http://localhost/laravel5authprc/index.php/login
If it works, then you need to set up a virtual Host in your apache vHosts file
这篇关于Laravel 5.4中RouteCollection.php(第179行)中的NotFoundHttpException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!