Closed BenRutlandWeb closed 3 years ago
Adding prefixes to individual routes is already possible in the actual route declaration e.g.
Route::get('[prefix]/blah-blah', BlahController::clas);
There is no need to create a new way of adding prefixes.
Adding middleware to individual routes should be done like laravel, with the middleware
method on the route, or in the controller constructor.
The router should be refactored to gather the middleware from the group, route and controller BEFORE running the request through the stack.
Route::get('blah-blah', BlahController::class)->middleware('some-middleware');
Is your feature request related to a problem? Please describe. Currently it's only possible to assign middleware to a group
Describe the solution you'd like A method to add prefixed/middleware onto a single route without grouping. Also to have on a controller
Describe alternatives you've considered grouping - it's excess code