Symfony2 No route found for "GET /": Method Not Allowed (Allow: POST)
17,479
They have both the same name
Try this:
dm_dashboard_login:
pattern: /
defaults: { _controller: DigitalManagerERPBundle:Default:login }
methods: [GET]
dm_dashboard_process:
pattern: /
defaults: { _controller: DigitalManagerERPBundle:Default:processLogin }
methods: [POST]
Comments
-
Kamran Ahmed almost 2 years
I have two routes defined in in a bundle inside
routing.yml
and that are:dm_dashboard: pattern: / defaults: { _controller: DigitalManagerERPBundle:Default:login } methods: [GET] dm_dashboard: pattern: / defaults: { _controller: DigitalManagerERPBundle:Default:processLogin } methods: [POST]
i.e. chose the first route for
GET
method and chose the second for thePOST
method. But when I try to get that to path, I am getting this errorNo route found for "GET /": Method Not Allowed (Allow: POST)
and none of the routes get executed. Can anyone please tell me what I'm doing wrong here? Why none of the routes executes?
P.S
Newbie here