路由::身份验证未包含在中间件中


Route::Auth not surrounded in Middleware

<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/', function () {
    return view('welcome');
});
Route::auth();
Route::get('/home', 'HomeController@index');

拉维尔routes.php .因此,当我查看Laravel 5.2的身份验证示例时,我总是看到Route::auth();Route::get('/home', 'HomeController@index')封装在Route::group(['middleware' => ['web']], function () {事物{中。但是每当我使用这些命令时php artisan make:auth它所做的就是创建我上面显示的命令。

为什么会这样做的任何线索?它工作正常,但我不是 100% 确定它是否正常运行。但我可以告诉你,我可以正确登录和注册。他们对拉拉维尔做了任何改变吗?

现在

默认应用 Web 中间件:

https://github.com/laravel/laravel/tree/master/app/Http

也在内核中.php

https://github.com/laravel/laravel/blob/master/app/Http/Kernel.php