EasyAdmin
EasyAdmin creates beautiful administration backends for your Symfony applications. It's free, fast, and fully documented.
Screencast
Like video tutorials? Check out the EasyAdmin Screencast on SymfonyCasts.
Table of Contents
- Dashboards (main menu, user menu, admin context, translations)
- CRUD controllers (entities, pagination, search, sorting, forms)
- Design (customization, templates, custom CSS/JS assets, Bootstrap theming, CSS variables)
- Fields (field configurators, custom fields, form columns, tabs and fieldsets)
- Filters (custom filters, filtering unmapped properties)
- Actions (CRUD actions, custom actions, batch actions, permissions, conditional display)
- Security (access control, menu/action/field/entity permissions, custom voters)
- Events (entity events, CRUD events, JavaScript events)
- Tests (functional testing, utilities, assertions)
- Upgrade (from legacy versions)
Technical Requirements
EasyAdmin requires the following:
- PHP 8.1 or higher;
- Symfony 5.4 or higher;
- Doctrine ORM entities (Doctrine ODM is not supported).
Installation
Run the following command to install EasyAdmin in your application:
1
$ composer require easycorp/easyadmin-bundle
If you use Symfony Flex in your application, you are ready to create your first Dashboard. Otherwise, keep reading because you need to perform some manual configuration.
Manual Configuration for Applications Not Using Symfony Flex
In most Symfony applications you don't need to make any of the following changes. These steps are only required for applications that do not use Symfony Flex.
First, register two bundles in your application. Edit the config/bundles.php
file and add the following:
1 2 3 4 5
return [
// ...
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true],
];
The TwigComponentBundle
is also required because EasyAdmin uses Twig Components
to build its interface. Next, create a configuration file for Twig Components
by adding the following file:
1 2 3 4 5 6
# config/packages/twig_component.yaml
twig_component:
anonymous_template_directory: 'components/'
defaults:
# Namespace & directory for components
App\Twig\Components\: 'components/'
The initial contents of this file should match those defined in the latest configuration recipe of Symfony UX Twig Component.
That's all! You are now ready to use EasyAdmin in your application. Start by creating your first Dashboard.