src/Controller/IndexController.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. final class IndexController extends AbstractController
  7. {
  8.     /**
  9.      * @Route("/", name="index")
  10.      * @return Response
  11.      */
  12.     public function indexAction(): Response
  13.     {
  14.         if($this->getUser()) {
  15.             return $this->redirectToRoute('product_index');
  16.         }
  17.         /*
  18.         if ($this->isGranted('ROLE_ASSIST')) {
  19.             return $this->redirectToRoute('product_index');
  20.         }
  21.         */
  22.         return $this->render('base.html.twig', []);
  23.     }
  24. }