<?php
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
class FrontController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function home(): Response
{
if ($this->isGranted('ROLE_USER')) {
return $this->redirectToRoute('dashboard', [], Response::HTTP_SEE_OTHER);
}
return $this->redirectToRoute('app_login', [], Response::HTTP_SEE_OTHER);
/*
return $this->render('home.html.twig', [
]);
*/
}
}