You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functionality is disabled by default in Symfony 2.2. To enable it,
9
-
you must call :method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
10
-
before you handle the request.
11
-
12
7
The HTTP method of a request is one of the requirements that can be checked
13
8
when seeing if it matches a route. This is introduced in the routing chapter
14
9
of the book ":doc:`/book/routing`" with examples using GET and POST. You can
@@ -76,6 +71,15 @@ delete it by matching on GET, PUT and DELETE.
76
71
77
72
return $collection;
78
73
74
+
Faking the Method with _method
75
+
------------------------------
76
+
77
+
.. note::
78
+
79
+
The ``_method`` functionality shown here is disabled by default in Symfony 2.2.
80
+
To enable it, you must call :method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
81
+
before you handle the request (e.g. in your front controller).
82
+
79
83
Unfortunately, life isn't quite this simple, since most browsers do not
80
84
support sending PUT and DELETE requests. Fortunately Symfony2 provides you
81
85
with a simple way of working around this limitation. By including a ``_method``
0 commit comments