我是新手,開始與Symfony合作。Symfony 3.0.6沒有看到我的路線
Atm即時通訊從官方symfony快速導覽documentation ...但我堅持控制器!
我敢肯定,我做了同樣的事情,在toutorial又出錯: GET /你好/名稱 「
這裏的「未找到路線」 是我的代碼:
的\ src \的appbundle \控制器\ DefaultController.php
/**
* @Route("hello/name{name}", name="hello")
*/
public function helloAction($name)
{
return $this->render('default/hello.html.twig', array(
'name'=> $name
));
}
\程序\資源\意見\ DEFAULT \ hello.html.twig
{%extends 'base.html.twig' %}{% block body %}
<h1>Hi {{name}}! Welcome to Symfony!</h1>{%endblock%}
是您的routes.yml配置爲接受來自DefaultController註解路線這不是很清楚嗎? –