run project: php -S 127.0.0.1:8000 -t public
better server, install:
composer require server
then:
./bin/console server:run
Annotations let you put the routes in the comments above the controller functions. Install:
composer require annotations
then:
/**
* @Route("/news/{slug}");
*/
public function show($slug) {
return new Response('ArticleController:show:' . $slug);
}
Symfony Recipes Server: https://symfony.sh
shows aliases for flex
Whenever you install a package, Flex will execute the recipe for that package if there is one. Recipes can add configuration files, create directories or modify files (like .gitignore)
composer require profiler --dev
composer require debug --dev