How can i define multiple middlewares for all routes in particular controller? Yes, i can define one midd in __constructor like:
$this->middleware( 'somemidd' );
and yes, i can define multiple midds for route like:
Route::get('/', ['middleware' => ['MyMiddleware', 'MySecondMiddleware'], function () {
//
}]);
define multiple midds for Route::resourse is not solution, coz i have custom methods in my controller. And i dont want to put midd in global scope Kernel\ protected $middleware = ...
How can i solve this?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire