src/Controller/LoginController.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Request;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  8. class LoginController extends AbstractController
  9. {
  10.     /**
  11.      * @Route("/login", name="app_login")
  12.      */
  13.     public function index(AuthenticationUtils $authenticationUtils): Response
  14.     {
  15.         $error $authenticationUtils->getLastAuthenticationError();
  16.         $lastUsername $authenticationUtils->getLastUsername();
  17.         return $this->render('login/index.html.twig', [
  18.             'last_username' => $lastUsername,
  19.             'error'         => $error,
  20.         ]);
  21.     }
  22.     /**
  23.      * @Route("/logout", name="logout", methods={"GET"})
  24.      */
  25.     public function logout(Request $request)
  26.     {
  27.     }
  28. }