<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
final class IndexController extends AbstractController
{
/**
* @Route("/", name="index")
* @return Response
*/
public function indexAction(): Response
{
if($this->getUser()) {
return $this->redirectToRoute('product_index');
}
/*
if ($this->isGranted('ROLE_ASSIST')) {
return $this->redirectToRoute('product_index');
}
*/
return $this->render('base.html.twig', []);
}
}