I'm starting a project in symfony 4 and I have a problem with the routes.
I am using annotations
This is my IndexController
:
<?php
namespace App\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
/**
* Class IndexController
*
* @Route('/index')
*/
class IndexController extends AbstractController
{
/**
* @Route("/", name="index")
*/
public function index()
{
return $this->render('index/index.html.twig', [
'controller_name' => 'IndexController',
]);
}
}
And this is the error that it gives me:
I have also installed annotations
and routing
with which it should work but it does not.