I want to declare both methods GET and POST for a same route in my routing.yml.
According the documentation it's possible with annotations like that :
/**
* @Route("/edit/{id}")
* @Method({"GET", "POST"})
*/
But how to YAML ? I tried different things :
contact_envoi:
pattern: /contact-envoi
defaults: { _controller: AcmeDemoBundle:Default:contactEnvoi }
requirements:
sf_method: ['get','post']
and
...
requirements:
_method: { 'GET', 'POST' }
but it still doesn't work ... Please help, I found nothing in the documentation about that.