Symfony2: No route found for "GET /lucky/number"
I have just added a
<?php
to the file "LuckyNumberController" and it works.... really strange.
Thanks everybody
Try this URL:
http://[Server-IP]:8000/app_dev.php/en/lucky/number
There's a bug in the Symfony Book: they forgot the demo app support i18n.
Just add the "/en" parameter before the routing ones.
I know this question it's closed but I hope my answer can help others that are still facing this problem.
Sometimes is a cache problem. Try to remove dev folder from /project/var/cache/dev.
As authentictech says, also you can try the command:
php bin/console cache:clear
If you want to specify the environment, you should add the --env=prod property.