src/Controller/SecurityController.php line 13
<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;class SecurityController extends AbstractController{#[Route('/', name: 'app_login')]public function login(AuthenticationUtils $authenticationUtils): Response{$error = $authenticationUtils->getLastAuthenticationError();$lastUsername = $authenticationUtils->getLastUsername();return $this->render('@EasyAdmin/page/login.html.twig', [// parameters usually defined in Symfony login forms'error' => $error,'last_username' => $lastUsername,// OPTIONAL parameters to customize the login form:// by default EasyAdmin displays a black square as its default favicon;// use this method to display a custom favicon: the given path is passed// "as is" to the Twig asset() function:// <link rel="shortcut icon" href="{{ asset('...') }}">//'favicon_path' => '/favicon-admin.svg',// the title visible above the login form (define this option only if you are// rendering the login template in a regular Symfony controller; when rendering// it from an EasyAdmin Dashboard this is automatically set as the Dashboard title)'page_title' => '<h2>Connexion</h2>',// the string used to generate the CSRF token. If you don't define// this parameter, the login form won't include a CSRF token'csrf_token_intention' => 'authenticate',// the URL users are redirected to after the login (default: '/admin')'target_path' => $this->generateUrl('app_admin_dashboard'),// the label displayed for the username form field (the |trans filter is applied to it)'username_label' => 'Utilisateur',// the label displayed for the password form field (the |trans filter is applied to it)'password_label' => 'Mot de passe',// the label displayed for the Sign In form button (the |trans filter is applied to it)'sign_in_label' => 'Log in',// whether to enable or not the "remember me" checkbox (default: false)'remember_me_enabled' => true,// the label displayed for the remember me checkbox (the |trans filter is applied to it)'remember_me_label' => 'Se rappeler de moi',]);}#[Route('/logout', name: 'app_logout', methods: ['GET'])]public function logout(){// controller can be blank: it will never be called!throw new \Exception('Don\'t forget to activate logout in security.yaml');}}