This commit is contained in:
Tykayn 2025-02-14 15:35:03 +01:00 committed by tykayn
parent d8c1b7c0f6
commit d01ecdabba
13 changed files with 198 additions and 25 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
final class LoginController extends AbstractController
{
#[Route('/login', name: 'app_login')]
public function index(): Response
{
return $this->render('login/index.html.twig', [
'controller_name' => 'LoginController',
]);
}
}

View file

@ -25,8 +25,9 @@ class SecurityController extends AbstractController
}
#[Route(path: '/logout', name: 'app_logout')]
public function logout(): void
public function logout(): Response
{
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
return $this->redirectToRoute('app_default');
}
}