Get the general route in rendered controller

Viewed 22

html.twig I am rendering a path like this :

{{ render(path('plugintabs')) }}

In the controller linked to this route if I $request->attributes->get('_route') it will return me 'plugintabs' but I want the global route (the one my browser shows me in the URL bar)

The best would be to have the route and not the route name.

Thanks

1 Answers
$this->container->get('request_stack')->getMasterRequest()->get('_route');

Was the solution for the name

and

$_SERVER["REQUEST_URI"]

for the route

Related