Routing in Symfony2

前端 未结 10 1683
抹茶落季
抹茶落季 2021-02-05 04:30

How to setup default routing in Symfony2?

In Symfony1 it looked something like this:

homepage:
  url:   /
  param: { module: default, action: index }

de         


        
10条回答
  •  广开言路
    2021-02-05 05:07

    Alternatively, you can use @Route annotation directly in a controller file. see https://github.com/sensio/SensioFrameworkExtraBundle/blob/master/Resources/doc/annotations/routing.rst

    As for the default routes, I think Symfony2 encourages explicit route mapping.

提交回复
热议问题