Skip to content

Commit

Permalink
[Book][Routing] Change example to match multiple methods
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaris committed Jul 5, 2015
1 parent c1dac43 commit 29dbb8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions book/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ be accomplished with the following route configuration:
/**
* @Route("/contact")
* @Method("POST")
* @Method({"POST", "PUT"})
*/
public function processContactAction()
{
Expand All @@ -862,7 +862,7 @@ be accomplished with the following route configuration:
contact_process:
path: /contact
defaults: { _controller: AppBundle:Main:processContact }
methods: [POST]
methods: [POST, PUT]
.. code-block:: xml
Expand All @@ -877,7 +877,7 @@ be accomplished with the following route configuration:
<default key="_controller">AppBundle:Main:contact</default>
</route>
<route id="contact_process" path="/contact" methods="POST">
<route id="contact_process" path="/contact" methods="POST|PUT">
<default key="_controller">AppBundle:Main:processContact</default>
</route>
</routes>
Expand All @@ -895,7 +895,7 @@ be accomplished with the following route configuration:
$collection->add('contact_process', new Route('/contact', array(
'_controller' => 'AppBundle:Main:processContact',
), array(), array(), '', array(), array('POST')));
), array(), array(), '', array(), array('POST', 'PUT')));
return $collection;
Expand Down

0 comments on commit 29dbb8d

Please sign in to comment.