Skip to content

Commit 4496d51

Browse files
committed
Fixed code examples in book/routing
1 parent 08af3c9 commit 4496d51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

book/routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ pattern that points to a specific PHP class and method:
8080
.. code-block:: php
8181
8282
// src/Acme/BlogBundle/Controller/BlogController.php
83-
8483
namespace Acme\BlogBundle\Controller;
84+
8585
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8686
8787
class BlogController extends Controller
8888
{
8989
public function showAction($slug)
9090
{
91-
$blog = // use the $slug variable to query the database
91+
$blog = ... use the $slug variable to query the database;
9292
9393
return $this->render('AcmeBlogBundle:Blog:show.html.twig', array(
9494
'blog' => $blog,
@@ -1145,7 +1145,7 @@ a template helper function:
11451145

11461146
.. code-block:: html+jinja
11471147

1148-
<a href="{{ path('blog_show', { 'slug': 'my-blog-post' }) }}">
1148+
<a href="{{ path('blog_show', {'slug': 'my-blog-post'}) }}">
11491149
Read this blog post.
11501150
</a>
11511151

@@ -1161,7 +1161,7 @@ Absolute URLs can also be generated.
11611161

11621162
.. code-block:: html+jinja
11631163

1164-
<a href="{{ url('blog_show', { 'slug': 'my-blog-post' }) }}">
1164+
<a href="{{ url('blog_show', {'slug': 'my-blog-post'}) }}">
11651165
Read this blog post.
11661166
</a>
11671167

0 commit comments

Comments
 (0)