<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\Security\Core\Security;class HomepageController extends AbstractController{ #[Route('/', name: 'homepage')] public function index(Security $security): Response { if ($security->getUser()) { return $this->redirectToRoute('dash_app'); } return $this->redirectToRoute('app_login'); }}