📜  symfony 获取路由路径 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:38.535000             🧑  作者: Mango

代码示例1
// from controller method
$url = $this->generateUrl("route_name", array(
  "param1" => "value1",
  "param2" => "value2"/*, ... */
);

// from twig template
{{ path('route_name', {'param1': 'value1', 'param2': 'value2'}) }}