2016-04-26 90 views
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做了什么改变吗?

回答

相关问题