在Laravel中,每次为我无法调试的每个操作请求身份验证时,我都会创建身份验证脚手架。
Route::group(array('before'=>'auth'),function(){
//module routes
Route::resource('menu','MenuController');
Route::resource('banner','BannerController');
Route::resource('products','ProductsController');
Route::get('/dashboard', 'DashboardController@index')->name('Dashboard');
Route::get('/home', 'HomeController@index')->name('home');
});
Auth::routes();