首页 > 代码库 > laravel在路由中设置中间件

laravel在路由中设置中间件

//单个 路由Route::get( ‘admin/admin/index‘ , [ ‘middleware‘ => ‘old‘, ‘uses‘ => ‘Admin\AdminController@index‘  ] );//路由群组Route :: group( [ ‘prefix‘ => ‘info‘ , ‘middleware‘ => ‘old‘ ] , function( ){    Route::get( ‘admin/admin/index‘,  [ ‘uses‘ => ‘Admin\AdminController@index‘, ] );});

 

laravel在路由中设置中间件