Laravel 5身份验证错误


Laravel 5 authentication error

当我点击localhost/laravel/public时,url变为localhost/laravel/public/auth/loin,并引发以下错误。NotFoundHttpException in RouteCollection.php line 143:

在我的routes.php中,我有:

Route::get('/index', ['middleware' => 'auth', function(){
    return view('index');
}]);

感谢

对于localhost/laravel/public尝试

Route::get('/', ['middleware' => 'auth', function(){
    return view('index');
}]);

您的路线将适用于localhost/laravel/public/index

回答我自己的问题!

project/app/http/middleware/authenticate。如果有人直接访问受限页面,我有一行用于重定向return redirect((->guest('auth/login'(。所以我只是删除了auth/login-to/login。