❮ NOTE ❯ This bundle releases new versions on a regular basis. Make sure to update your dependencies frequently to get the latest version. Check out the changelog to learn about the new features.
EasyAdmin lets you create administration backends for Symfony applications with unprecedented simplicity.
Features
- CRUD operations on Doctrine entities (create, edit, list, delete).
- Full-text search, pagination and column sorting.
- Fully responsive design (smartphones, tablets and desktops).
- Translated into tens of languages.
- Fast, simple and smart where appropriate.
Requirements
- Symfony 2.3+ applications (Silex not supported).
- Doctrine ORM entities (Doctrine ODM and Propel not supported).
- Entities with simple primary keys (composite keys not supported).
- All kinds of entity associations are supported, except
many-to-many
. - Entities using inheritance are not supported.
The EasyAdmin installation requires you to edit two files and execute two console commands, as explained in the following steps.
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require javiereguiluz/easyadmin-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your Symfony application:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new JavierEguiluz\Bundle\EasyAdminBundle\EasyAdminBundle(),
);
}
// ...
}
Open your main routing configuration file (usually app/config/routing.yml
)
and copy the following four lines at the very beginning of it:
# app/config/routing.yml
easy_admin_bundle:
resource: "@EasyAdminBundle/Controller/"
type: annotation
prefix: /admin
# ...
This bundle includes several CSS, JavaScript and font files which are used in the backend interface. Execute the following command to make those assets available in your Symfony application:
php app/console assets:install --symlink
That's it! Now everything is ready to create your first admin backend.
Creating your first backend will take you around 30 seconds because you just have to create a simple configuration file.
Let's suppose that you already have defined in your Symfony application three
Doctrine ORM entities called Customer
, Order
and Product
. Open your main
application configuration file (usually app/config/config.yml
) and add the
following configuration:
# app/config/config.yml
easy_admin:
entities:
- AppBundle\Entity\Customer
- AppBundle\Entity\Order
- AppBundle\Entity\Product
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:
Creating a backend is that simple because EasyAdmin doesn't generate any code. All resources are served on-the-fly to ensure an exceptional developer experience.
Without any further configuration, EasyAdmin guesses the best settings to make your admin backend look "good enough". This may be acceptable for simple backends and rapid prototypes, but most of the times, you need to customize some parts of the backend. Keep reading the rest of the documentation to learn how to do it.
- Chapter 3 - Customizing your first backend
- Chapter 4 - Customizing the List View
- Chapter 5 - Customizing the Show View
- Chapter 6 - Customizing the Edit and New Views
- Chapter 7 - Customizing the Search View
- Chapter 8 - Customizing the View Actions
- Chapter 9 - Advanced Techniques for Complex Backends
- Chapter 10 - Customizing the Visual Design of the Backend
- Chapter 11 - Configuration Reference
- Chapter 12 - About this Project
❮ NOTE ❯ you are reading the documentation of the bundle's most recent stable version. You can also read the documentation of the development version ➜.
This software is published under the MIT License, which states that:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.