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 the POST
method. But when I try to get that to path, I am getting this error
No 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
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]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With