I have an absolutely clear standart Symfony installation, here's the homepage http://triod.ru/project/web/ (I only changed prod to dev so I could see the logs)
I made a file LuckyController.php in src/AppBundle/Controller directory
<?
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
class LuckyController
{
/**
* @Route("/lucky/number")
*/
public function numberAction()
{
$number = rand(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}
but there's nothing on the page http://triod.ru/project/web/lucky/number The class itself was taken from the Symfony official tutorial/documentation, but it doesn't work. I have no idea how it is possible.