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