javiereguiluz/easyadmin-bundle

Admin generator for Symfony applications

v1.17.4 2017-10-15 13:39 UTC

README

Tests Code Quality Code Coverage Symfony 2.x and 3.x

EasyAdmin creates administration backends for your Symfony applications with unprecedented simplicity.

Symfony Backends created with EasyAdmin

Features

  • CRUD operations on Doctrine entities (create, edit, list, delete).
  • Full-text search, pagination and column sorting.
  • Fully responsive design (smartphones, tablets and desktops).
  • Supports Symfony 2.x and 3.x.
  • Translated into tens of languages.
  • Fast, simple and smart where appropriate.

Requirements

  • Symfony 2.3+ or 3.x applications (Silex not supported).
  • Doctrine ORM entities (Doctrine ODM and Propel not supported).
  • Entities with composite keys or using inheritance are not supported.

Documentation

Read the EasyAdminBundle documentation at symfony.com.

Demo Application

easy-admin-demo is a complete Symfony application created to showcase EasyAdmin features.

Installation

Step 1: Download the Bundle

$ composer require javiereguiluz/easyadmin-bundle

This command requires you to have Composer installed globally, as explained in the Composer documentation.

Step 2: Enable the Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle(),
        );
    }

    // ...
}

Step 3: Load the Routes of the Bundle

# app/config/routing.yml
easy_admin_bundle:
    resource: "@EasyAdminBundle/Controller/"
    type:     annotation
    prefix:   /admin

# ...

Step 4: Prepare the Web Assets of the Bundle

# Symfony 2
php app/console assets:install --symlink

# Symfony 3
php bin/console assets:install --symlink

That's it! Now everything is ready to create your first admin backend.

Your First Backend

Creating your first backend will take you less than 30 seconds. Let's suppose that your Symfony application defines three Doctrine ORM entities called Product, Category and User.

Open the app/config/config.yml file and add the following configuration:

# app/config/config.yml
easy_admin:
    entities:
        - AppBundle\Entity\Product
        - AppBundle\Entity\Category
        - AppBundle\Entity\User

Congratulations! You've just created your first fully-featured backend! Browse the /admin URL in your Symfony application and you'll get access to the admin backend:

Default EasyAdmin Backend interface

Keep reading the rest of the documentation to learn how to create complex backends.

License

This software is published under the MIT License