get path route symfony 5 code example
Example: symfony get path to route
// from controller method
$url = $this->generateUrl("route_name", array(
"param1" => "value1",
"param2" => "value2"/*, ... */
);
// from twig template
{{ path('route_name', {'param1': 'value1', 'param2': 'value2'}) }}