diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php new file mode 100644 index 0000000..3702bea --- /dev/null +++ b/src/Controller/HomeController.php @@ -0,0 +1,17 @@ +render('home/index.html.twig'); + } +} diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index a1e8b27..e30e778 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -10,7 +10,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; class SecurityController extends AbstractController { - #[Route(path: '/login', name: 'app_login')] + #[Route(path: '/login', name: 'app_login', methods: [Request::METHOD_GET, Request::METHOD_POST])] public function login(AuthenticationUtils $authenticationUtils): Response { return $this->render('security/login.html.twig', [ @@ -19,7 +19,7 @@ class SecurityController extends AbstractController ]); } - #[Route(path: '/logout', name: 'app_logout')] + #[Route(path: '/logout', name: 'app_logout', methods: Request::METHOD_GET)] public function logout(): void { throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); diff --git a/templates/home/index.html.twig b/templates/home/index.html.twig new file mode 100644 index 0000000..c9b5d4e --- /dev/null +++ b/templates/home/index.html.twig @@ -0,0 +1,7 @@ +{% extends 'base.html.twig' %} + +{% block title %}Home!{% endblock %} + +{% block body %} + Home +{% endblock %}