getUser()) { return $this->redirectToRoute('admin_dashboard'); } return $this->render('admin/security/login.html.twig', [ 'last_username' => $authUtils->getLastUsername(), 'error' => $authUtils->getLastAuthenticationError(), ]); } #[Route('/admin/logout', name: 'admin_logout')] public function logout(): void { // Symfony interceptet diese Route, daher bleibt sie leer. throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); } }