0
<?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', '[email protected]');
Laravel routes.php
。所以当我看看Laravel 5.2的Auth示例时,我总是看到Route::group(['middleware' => ['web']], function() {
事件中的Route::auth();
和Route::get('/home', '[email protected]')
封装在{
中。但是,只要我使用命令php artisan make:auth
,它所做的只是创建一个我上面展示的。Route :: Auth未包含在中间件中
任何线索为什么这样做?它工作正常,但我不能100%确定它是否正常工作。但我可以告诉你,我可以正确登录和注册。他们对Laravel做了什么改变吗?
至于混乱,进行了更改Laravel后释放5.2,特别是在框架版本5.2.27中。这就是为什么你在这个团队看到很多例子。 – SlateEntropy