I wish to manipulate the url variable in middleware then to pass new vaule to some additional middleware for checking, then pass new value to controller
Arbitrary example: domain.com/1
->
middleware to add 3 to 1 ->
middleware to check new number 4
against database ->
pass new number to controller
My route:
Route::get('{v}', [
'middleware' => ['rewrite','dbCheck'],
'uses' => 'video@search'
]);
I get the variable in the middlewares using $v = $request->v;
- how do I return the rewritten variable to the next middleware and ultimately the controller?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire