Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
abdc1fc7
Commit
abdc1fc7
authored
Feb 18, 2013
by
Rob Dudley
Committed by
Fabien Potencier
Feb 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated docs to include _method and enableHttpMethodParameterOverride()
parent
c421eab3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
doc/usage.rst
doc/usage.rst
+22
-0
No files found.
doc/usage.rst
View file @
abdc1fc7
...
...
@@ -230,6 +230,28 @@ methods on your application: ``get``, ``post``, ``put``, ``delete``::
...
});
.. tip::
Forms in most web browsers do not directly support the use of other HTTP
methods. To use methods other than GET and POST you can utilize a special
form field with a name of ``_method``. The form's ``method`` attribute must
be set to POST when using this field::
<form action="/my/target/route/" method="post">
...
<input type="hidden" id="_method" name="_method" value="PUT" />
</form>
.. note::
If using Symfony Components >= 2.2.0 you will need to explicitly enable this
method override::
use Symfony\Component\HttpFoundation\Request;
Request::enableHttpMethodParameterOverride();
$app->run();
You can also call ``match``, which will match all methods. This can be
restricted via the ``method`` method::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment