Files
Snips/src/Controller/HomeController.php

20 lines
501 B
PHP

<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class HomeController extends AbstractController
{
#[Route('/', name: 'home')]
public function home(): Response
{
if ($this->getUser()) {
return $this->redirectToRoute('snip_index');
} else {
return $this->redirectToRoute('snip_public');
}
}
}