中间件和路由,怎么解决?
我使用的路由是:
Route::get('/front/index/indexLevelOne/{id}','Front\IndexController@indexLevelOne');
然后使用中间件后:
Route::get('/front/index/indexLevelOne/{id}',['middleware' => 'auth', function () {
//
'Front\IndexController@indexLevelOne';
}]);
然后就报错了,请教大家这是为什么
请仔细阅读文档
http://learnku.com/docs/laravel/5.4/routing#中间件