Routing in Symfony2

前端 未结 10 1687
抹茶落季
抹茶落季 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:14

    // Symfony2 PR10

    in routing.yml:

    default:
        pattern:  /{_controller}
    

    It enables you to use this kind of urls: http://localhost/MySuperBundle:MyController:myview

提交回复
热议问题