marcopierac's avatar

Lumen 7 - Get registered route URI

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

0 likes
0 replies

Please or to participate in this conversation.