8000 [#6062] tweak route names · symfony/symfony-docs@87d3167 · GitHub
[go: up one dir, main page]

Skip to content

Commit 87d3167

Browse files
committed
[#6062] tweak route names
1 parent 7dff788 commit 87d3167

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

book/routing.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -854,12 +854,12 @@ accomplished with the following route configuration:
854854
.. code-block:: yaml
855855
856856
# app/config/routing.yml
857-
api_show_post:
857+
api_post_show:
858858
path: /api/posts/{id}
859859
defaults: { _controller: AppBundle:BlogApi:show }
860860
methods: [GET, HEAD]
861861
862-
api_edit_post:
862+
api_post_edit:
863863
path: /api/posts/{id}
864864
defaults: { _controller: AppBundle:BlogApi:edit }
865865
methods: [PUT]
@@ -873,11 +873,11 @@ accomplished with the following route configuration:
873873
xsi:schemaLocation="http://symfony.com/schema/routing
874874
http://symfony.com/schema/routing/routing-1.0.xsd">
875875
876-
<route id="api_show_post" path="/api/posts/{id}" methods="GET|HEAD">
876+
<route id="api_post_show" path="/api/posts/{id}" methods="GET|HEAD">
877877
<default key="_controller">AppBundle:BlogApi:show</default>
878878
</route>
879879
880-
<route id="api_edit_post" path="/api/posts/{id}" methods="PUT">
880+
<route id="api_post_edit" path="/api/posts/{id}" methods="PUT">
881881
<default key="_controller">AppBundle:BlogApi:edit</default>
882882
</route>
883883
</routes>
@@ -889,11 +889,11 @@ accomplished with the following route configuration:
889889
use Symfony\Component\Routing\Route;
890890
891891
$collection = new RouteCollection();
892-
$collection->add('api_show_post', new Route('/api/posts/{id}', array(
892+
$collection->add('api_post_show', new Route('/api/posts/{id}', array(
893893
'_controller' => 'AppBundle:BlogApi:show',
894894
), array(), array(), '', array(), array('GET', 'HEAD')));
895895
896-
$collection->add('api_edit_post', new Route('/api/posts/{id}', array(
896+
$collection->add('api_post_edit', new Route('/api/posts/{id}', array(
897897
'_controller' => 'AppBundle:BlogApi:edit',
898898
), array(), array(), '', array(), array('PUT')));
899899

0 commit comments

Comments
 (0)
0