Controller Setup - MiguelFieira/AMO-HANDBOEK GitHub Wiki
Symfony is a PHP framework for web applications and a set of reusable PHP components. Symfony is used by thousands of web applications (including BlaBlaCar.com and Spotify.com) and most of the popular PHP projects (including Drupal and Magento).
A controller is a PHP function you create that reads information from the Request object and creates and returns a Response object. The response could be an HTML page, JSON, XML, a file download, a redirect, a 404 error or anything else. The controller executes whatever arbitrary logic your application needs to render the content of a page.
A Controller is automatically made with
make:formand are part ofmake:crudmore info Here!
Creating a Controller
- Open your terminal
php bin/console make:controller
- Enter the name "DefaultController"
// This should create a new Controller in src/Controller/DefaultController.
Result
Optional
- You can change the default path of a router with annotation!
- You can change the default styling in
src/templates/default/index.html.twig.
Or change it in the routes.yaml (Will be added soon)

