Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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'}) }}
 
PREVIOUS NEXT
Tagged: #symfony #path #route
ADD COMMENT
Topic
Name
4+2 =