src/Front/Controller/Customer/LoginController.php line 19

  1. <?php
  2. namespace App\Front\Controller\Customer;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController,
  4.     Symfony\Component\HttpFoundation\Response,
  5.     Symfony\Component\HttpFoundation\Request,
  6.     Symfony\Component\Routing\Annotation\Route,
  7.     Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  8. class LoginController extends AbstractController
  9. {
  10.     #[Route(path: [
  11.         'pl' => '/zaloguj',
  12.         'en' => '/login'
  13.     ], name'customer_login'methods: [Request::METHOD_GETRequest::METHOD_POST], priority10)]
  14.     public function login(AuthenticationUtils $authenticationUtils): Response {
  15.         $lastUsername $authenticationUtils->getLastUsername();
  16.         $error $authenticationUtils->getLastAuthenticationError();
  17.         return $this->render('@front_templates/Customer/login.html.twig', [
  18.             'last_username' => $lastUsername,
  19.             'error' => $error,
  20.         ]);
  21.     }
  22.     #[Route(path: [
  23.         'pl' => '/wyloguj',
  24.         'en' => '/logout'
  25.     ], name'customer_logout'methods: [Request::METHOD_POST], priority10)]
  26.     public function logout()
  27.     {
  28.     }
  29. }