10000 Rework quick tour big picture by xabbuh · Pull Request #5461 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Rework quick 8000 tour big picture #5461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion book/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ browsing the project directory and executing this command:
$ cd my_project_name/
$ php app/console server:run

Then, open your browser and access the ``http://localhost:8000`` URL to see the
Then, open your browser and access the ``http://localhost:8000/app/example``
URL to see the
Welcome page of Symfony:

.. image:: /images/quick_tour/welcome.png
Expand Down
Binary file modified images/quick_tour/welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 12 additions & 16 deletions quick_tour/the_big_picture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ the project directory and executing this command:
$ cd myproject/
$ php app/console server:run

Open your browser and access the ``http://localhost:8000`` URL to see the
Open your browser and access the ``http://localhost:8000/app/example`` URL to see the
welcome page of Symfony:

.. image:: /images/quick_tour/welcome.png
Expand All @@ -106,20 +106,16 @@ Congratulations! Your first Symfony project is up and running!
them are explained in the
:ref:`Setting up Permissions <book-installation-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::

Expand All @@ -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.
Expand Down Expand Up @@ -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
~~~~~~~
Expand Down Expand Up @@ -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.

Expand Down
0