Skip to content

Commit 29dbb8d

Browse files
committed
[Book][Routing] Change example to match multiple methods
1 parent c1dac43 commit 29dbb8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

book/routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ be accomplished with the following route configuration:
843843
844844
/**
845845
* @Route("/contact")
846-
* @Method("POST")
846+
* @Method({"POST", "PUT"})
847847
*/
848848
public function processContactAction()
849849
{
@@ -862,7 +862,7 @@ be accomplished with the following route configuration:
862862
contact_process:
863863
path: /contact
864864
defaults: { _controller: AppBundle:Main:processContact }
865-
methods: [POST]
865+
methods: [POST, PUT]
866866
867867
.. code-block:: xml
868868
@@ -877,7 +877,7 @@ be accomplished with the following route configuration:
877877
<default key="_controller">AppBundle:Main:contact</default>
878878
</route>
879879
880-
<route id="contact_process" path="/contact" methods="POST">
880+
<route id="contact_process" path="/contact" methods="POST|PUT">
881881
<default key="_controller">AppBundle:Main:processContact</default>
882882
</route>
883883
</routes>
@@ -895,7 +895,7 @@ be accomplished with the following route configuration:
895895
896896
$collection->add('contact_process', new Route('/contact', array(
897897
'_controller' => 'AppBundle:Main:processContact',
898-
), array(), array(), '', array(), array('POST')));
898+
), array(), array(), '', array(), array('POST', 'PUT')));
899899
900900
return $collection;
901901

0 commit comments

Comments
 (0)