src/Controller/Web/IndexController.php line 11

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller\Web;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. #[Route('/''index')]
  7. final class IndexController extends AbstractAppController
  8. {
  9.     public function __invoke(): Response
  10.     {
  11.         if ($this->isGranted('ROLE_USER')) {
  12.             return $this->redirectToRoute('dashboard');
  13.         }
  14.         return $this->render('index/index.html.twig');
  15.     }
  16. }