I just started following a symfony 4 tutorialI set up the whole project with composer and got the index file showing up in browser http://127.0.0.1:8000/
I'm stuck on the very first Router/Controller/View exampleThe route is not working properly or at all. I always get a 404 error.
1:
2:
3:
<?phpnamespace App\Controller;use Symfony\Component\HttpFoundation\Response;class LuckyController{ public function number() { $number = random_int(0, 100); return new Response('<html><body>Lucky number: '.$number.'</body></html>' ); }}
# the "app_lucky_number" route name is not important yetapp_lucky_number: path: /lucky/number controller: App\Controller\LuckyController::number
I'm out of ideas, I've looked everywhere on google and did not found a solution.