Skip to content

Instantly share code, notes, and snippets.

View COil's full-sized avatar
🎯
Focusing

Loïc Vernet COil

🎯
Focusing
View GitHub Profile
@COil
COil / AdminController.php
Last active January 13, 2018 19:30
phpinfo() action for the easy admin bundle
<?php
// src/AppBundle/Controller/Admin/AdminController.php
namespace AppBundle\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AdminController as BaseAdminController;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@COil
COil / error429.html.twig
Created November 4, 2018 09:53
Example of Twig template for the 429 error code (HTTP_TOO_MANY_REQUESTS)
{# templates/bundles/TwigBundle/Exception/error429.html.twig #}
{% extends 'layout.html.twig' %}
{% block meta_title %}Error {{ status_code }}, too many login attempts{% endblock meta_title %}
{% block body %}
<h1>Security warning</h1>
<h2>Too many login attempts</h2>