Skip to content

EasyAdmin

Edit this page

EasyAdmin creates beautiful administration backends for your Symfony applications. It's free, fast and fully documented.

If you already used previous EasyAdmin versions, beware that EasyAdmin 3 uses a brand new architecture and it's incompatible with previous versions. However, there's a command to upgrade from EasyAdmin 2 to EasyAdmin 3 automatically.

Screencast

Like video tutorials? Check out the EasyAdmin Screencast on SymfonyCasts.

Technical Requirements

EasyAdmin requires the following:

  • PHP 8.0.2 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 have opted not to 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.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.
TOC
    Version