Skip to content
Snippets Groups Projects
Commit 75b8714f authored by Fabien Potencier's avatar Fabien Potencier
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment