diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index da37909b87a..f458fdfc439 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -106,20 +106,16 @@ Congratulations! Your first Symfony project is up and running! them are explained in the :ref:`Setting up Permissions ` section of the official book. - + If the welcome page does not seem to be rendering CSS or image assets, install them first: - + .. code-block:: bash - + $ php app/console assets:install When you are finished working on your Symfony application, you can stop -the server with the ``server:stop`` command: - -.. code-block:: bash - - $ php app/console server:stop +the server by pressing Ctrl and C. .. tip:: @@ -135,15 +131,15 @@ of database calls, HTML tags and other PHP code in the same script. To achieve this goal with Symfony, you'll first need to learn a few fundamental concepts. When developing a Symfony application, your responsibility as a developer -is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/``) -to the *resource* associated with it (the ``Welcome to Symfony!`` HTML page). +is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/app/example``) +to the *resource* associated with it (the ``Homepage`` HTML page). The code to execute is defined in **actions** and **controllers**. The mapping between user's requests and that code is defined via the **routing** configuration. And the contents displayed in the browser are usually rendered using **templates**. -When you browsed ``http://localhost:8000/`` earlier, Symfony executed the -controller defined in the ``src/AppBundle/Controller/DefaultController.php`` +When you browsed ``http://localhost:8000/app/example`` earlier, Symfony executed +the controller defined in the ``src/AppBundle/Controller/DefaultController.php`` file and rendered the ``app/Resources/views/default/index.html.twig`` template. In the following sections you'll learn in detail the inner workings of Symfony controllers, routes and templates. @@ -186,7 +182,7 @@ information and then they render a template to show the results to the user. In this example, the ``index`` action is practically empty because it doesn't need to call any other method. The action just renders a template with the -*Welcome to Symfony!* content. +*Homepage.* content. Routing ~~~~~~~ @@ -221,8 +217,8 @@ start with ``/**``, whereas regular PHP comments start with ``/*``. The first value of ``@Route()`` defines the URL that will trigger the execution of the action. As you don't have to add the host of your application to the URL (e.g. ```http://example.com``), these URLs are always relative and -they are usually called *paths*. In this case, the ``/`` path refers to -the application homepage. The second value of ``@Route()`` (e.g. +they are usually called *paths*. In this case, the ``/app/example`` path +refers to the application homepage. The second value of ``@Route()`` (e.g. ``name="homepage"``) is optional and sets the name of this route. For now this name is not needed, but later it'll be useful for linking pages.