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', ] );
});

 

posted @ 2016-09-12 13:17  codefly-sun  阅读(3106)  评论(0编辑  收藏  举报