====== Create Your First Page in Symfony ======
===== TL;DR =====
* Controllers live in **''src/AppBundle/Controller''**.
* Templates live in **''app/Resources/views''**.
* Use annotation in controllers to specify routes.
* **''app/''**: Contains things like configuration and templates--basically, anything that is not PHP code.
* **''src/''**: Your PHP code lives here.
* **''web/''**: Document root for the project; contains any publicly accessible files like CSS, images and the front controllers (''app_dev.php'' and ''app.php'').
* **''vendor/''**: Third-party libraries and bundles downloaded by [[https://getcomposer.org/|Composer]].
* The main configuration file for bundles is **''app/config/config.yml''**.
render(
'lucky/number.html.twig', [
'luckyNumberList' => $numbersList
]
);
}
}
{% extends 'base.html.twig' %}
{% block body %}
Lucky Numbers: {{ luckyNumberList }}
{% endblock %}
===== Creating a new route/controller (static URL) =====
Controllers live in **''src/AppBundle/Controller''**. Create with name ''Controller.php'' and use annotation to specify routes:
Lucky number: '.$number.'