diff --git a/security/login_link.rst b/security/login_link.rst index e5680ea5de3..86406f9b316 100644 --- a/security/login_link.rst +++ b/security/login_link.rst @@ -108,6 +108,23 @@ intercept requests to this route: throw new \LogicException('This code should never be reached'); } } + + .. code-block:: php-attributes + + // src/Controller/SecurityController.php + namespace App\Controller; + + use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; + use Symfony\Component\Routing\Annotation\Route; + + class SecurityController extends AbstractController + { + #[Route('/login_check', name: 'login_check')] + public function check() + { + throw new \LogicException('This code should never be reached'); + } + } .. code-block:: yaml