Permalink
Browse files

minor #4893 Move annotations example to front (ifdattic)

This PR was merged into the 2.3 branch.

Discussion
----------

Move annotations example to front

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

aaecb02 Move annotations example to front
  • Loading branch information...
weaverryan committed Jan 30, 2015
2 parents 2b7e5ee + aaecb02 commit 7c66a8b0b0f3c085abab04abcbdb6cb1e73a06d9
Showing with 15 additions and 15 deletions.
  1. +15 −15 cookbook/routing/slash_in_parameter.rst
@@ -24,6 +24,21 @@ a more permissive regex path.
.. configuration-block::
.. code-block:: php-annotations
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DemoController
{
/**
* @Route("/hello/{name}", name="_hello", requirements={"name"=".+"})
*/
public function helloAction($name)
{
// ...
}
}
.. code-block:: yaml
_hello:
@@ -60,19 +75,4 @@ a more permissive regex path.
return $collection;
.. code-block:: php-annotations
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DemoController
{
/**
* @Route("/hello/{name}", name="_hello", requirements={"name" = ".+"})
*/
public function helloAction($name)
{
// ...
}
}
That's it! Now, the ``{username}`` parameter can contain the ``/`` character.

0 comments on commit 7c66a8b

Please sign in to comment.