on-internet
← Community

Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /"

Stack Overflow ·

I just started following a symfony 4 tutorial I 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 example The route is not working properly or at all. I always get a 404 error. 1: 2: 3: <?php namespace 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 yet app_luc

Comments

Sign in or sign up to comment and upvote.

No comments yet.