We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normally Lumen decorates the Request with the routing parameters.
E.g. in routes/web.php:
routes/web.php
$router->group(['prefix' => '/{prefixId:[0-9]+}'], function () use ($router) { $router->get('/something/{somethingId:[0-9]+}', 'SomethingController@show'); }
You would be able to attach a middleware to the group() or the get(), and access $request->prefixId or $request->somethingId.
group()
get()
$request->prefixId
$request->somethingId
public function handle(Request $request, Closure $next) { if(42 === (int) $request->prefixId) return null; if(1 === (int) $request->somethingId) return null; return $next($request); }
This does not work under lumen-testing.
(I guess this is related to Issue #18)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Normally Lumen decorates the Request with the routing parameters.
E.g. in
routes/web.php
:You would be able to attach a middleware to the
group()
or theget()
, and access$request->prefixId
or$request->somethingId
.This does not work under lumen-testing.
(I guess this is related to Issue #18)
The text was updated successfully, but these errors were encountered: