<?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');
Laravel routes.php
。因此,当我查看Laravel 5.2的Auth示例时,我总是会看到Route::auth();
和Route::get('/home', 'HomeController@index')
封装在{
事件的Route::group(['middleware' => ['web']], function () {
中。但每当我使用命令php artisan make:auth
时,它所做的就是创建我上面显示的命令。
为什么会这样做的任何线索?它工作正常,但我不能100%确定它是否正常运行。但我可以告诉你,我可以正确登录和注册。他们对Laravel做了什么改变吗?
答案 0 :(得分:2)