1 week ago

Lumen 7 - Get registered route URI

Posted 1 week ago by marcopierac

Hello, i'd like to know if it's possible to get the registered route URI of the current request, in Lumen 7. For example, if i have the following route registered:

$app->get('foo/{bar}[/optional]', function () {

and if i do an HTTP call like this: GET foo/xxx/123

i'd like to be able to retrieve 'foo/{bar}[/optional]'in a middleware.

I tried with $request->decodedPath(), $request->path(), $request->url(), $request->route(). All of these give me at most the interpolated value foo/xxx/123, but i need the uninterpolated value.

thank you for your time

Please sign in or create an account to participate in this conversation.