Commit 75b8714f authored by Fabien Potencier's avatar Fabien Potencier

minor #941 Change the order of routes. (ifdattic)

This PR was merged into the 1.0 branch.

Discussion
----------

Change the order of routes.

The note below suggests adding more generic routes at the bottom
as the first matching route is used.

In my opinion the code block should also follow this suggestion
as it makes more clear how to use routes.

Commits
-------

a1a61fd1 Change the order of routes.
parents 185be1eb a1a61fd1
......@@ -255,10 +255,6 @@ methods on your application: ``get``, ``post``, ``put``, ``delete``::
You can also call ``match``, which will match all methods. This can be
restricted via the ``method`` method::
$app->match('/blog', function () {
...
});
$app->match('/blog', function () {
...
})
......@@ -269,6 +265,10 @@ restricted via the ``method`` method::
})
->method('PUT|POST');
$app->match('/blog', function () {
...
});
.. note::
The order in which the routes are defined is significant. The first
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment