<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
class HomeController extends BaseController
{
public function __construct(Environment $twig)
{
$this->isDesktop($twig);
}
/**
* @Route("/", name="app_home")
*/
public function index(): Response
{
$user = $this->getUser();
if($user != null){
return $this->redirectToRoute('view_invoices');
}
return $this->render('/home/index.html.twig');
}
}