Skip to content

Commit 45b3781

Browse files
javiereguiluzwouterj
authored andcommitted
Updated the Quick Tour to the latest changes introduced by Symfony
1 parent 55726a1 commit 45b3781

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

quick_tour/the_big_picture.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ of database calls, HTML tags and other PHP code in the same script. To achieve
131131
this goal with Symfony, you'll first need to learn a few fundamental concepts.
132132

133133
When developing a Symfony application, your responsibility as a developer
134-
is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/app/example``)
134+
is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/``)
135135
to the *resource* associated with it (the ``Homepage`` HTML page).
136136

137137
The code to execute is defined in **actions** and **controllers**. The mapping
@@ -159,7 +159,7 @@ because that will be explained in the next section)::
159159
class DefaultController extends Controller
160160
{
161161
/**
162-
* @Route("/app/example", name="homepage")
162+
* @Route("/", name="homepage")
163163
*/
164164
public function indexAction()
165165
{
@@ -201,7 +201,7 @@ at the three lines of code above the ``indexAction`` method::
201201
class DefaultController extends Controller
202202
{
203203
/**
204-
* @Route("/app/example", name="homepage")
204+
* @Route("/", name="homepage")
205205
*/
206206
public function indexAction()
207207
{
@@ -217,15 +217,14 @@ start with ``/**``, whereas regular PHP comments start with ``/*``.
217217
The first value of ``@Route()`` defines the URL that will trigger the execution
218218
of the action. As you don't have to add the host of your application to
219219
the URL (e.g. ```http://example.com``), these URLs are always relative and
220-
they are usually called *paths*. In this case, the ``/app/example`` path
221-
refers to the application homepage. The second value of ``@Route()`` (e.g.
222-
``name="homepage"``) is optional and sets the name of this route. For now
223-
this name is not needed, but later it'll be useful for linking pages.
220+
they are usually called *paths*. In this case, the ``/`` path refers to the
221+
application homepage. The second value of ``@Route()`` (e.g. ``name="homepage"``)
222+
is optional and sets the name of this route. For now this name is not needed,
223+
but later it'll be useful for linking pages.
224224

225-
Considering all this, the ``@Route("/app/example", name="homepage")`` annotation
226-
creates a new route called ``homepage`` which makes Symfony execute the
227-
``index`` action of the ``Default`` controller when the user browses the
228-
``/app/example`` path of the application.
225+
Considering all this, the ``@Route("/", name="homepage")`` annotation creates a
226+
new route called ``homepage`` which makes Symfony execute the ``index`` action
227+
of the ``Default`` controller when the user browses the ``/`` path of the application.
229228

230229
.. tip::
231230

@@ -257,13 +256,14 @@ you'll see the following code:
257256
{% extends 'base.html.twig' %}
258257

259258
{% block body %}
260-
Homepage.
259+
<h1>Welcome to Symfony</h1>
260+
261+
{# ... #}
261262
{% endblock %}
262263

263-
This template is created with `Twig`_, a new template engine created for
264-
modern PHP applications. The
265-
:doc:`second part of this tutorial </quick_tour/the_view>` will introduce
266-
how templates work in Symfony.
264+
This template is created with `Twig`_, a template engine created for modern PHP
265+
applications. The :doc:`second part of this tutorial </quick_tour/the_view>`
266+
explains how templates work in Symfony.
267267

268268
.. _quick-tour-big-picture-environments:
269269

0 commit comments

Comments
 (0)