Ordering of routes using annotations

后端 未结 3 1619
生来不讨喜
生来不讨喜 2020-12-17 15:34

The usual solution when you create routes in symfony and you want to have one route like

/{username}

so that it does not conflict with othe

3条回答
  •  佛祖请我去吃肉
    2020-12-17 15:48

    I can't comment on the answer, so I will leave how I had to write it in Symfony 2.3 to get it to work:

    Home:
        resource: "@AcmeBundle/Controller/HomeController.php"
        prefix: /home #optional
        type: annotation
    

    Notice the change of "\" to "/" and using .php at the end of controller name.

提交回复
热议问题