Admin panel for Symfony from Sonata Bundle

If you are looking for a quick solution for the administration panel for the Symfony framework, then I recommend you Sonata Admin Bundle. It is an administrative system in which you can easily build facilities for your project. In addition to the bundle of the administration panel, Stanta also provides other bundles such as: Block Bundle, Page Bundle (text pages), Newsl Blundle (news), Media Bundle (media management), Seo Bundle, Ecommerce (online store), Classification Bundle (categorization).

Installation and configuration of Sonata Admin Bundle for Symfony 4.

  1. Installation bundle form console:

2. Install one of the following Bundles for doctrinal management:

The standard is:

3. Go to the file configuration file: (config / bundles.php) and add the following entries:

4. Create a file for routing in the location: (/ config / routes /) with the name: sonata_admin.yaml and the following content:

5. Create a configuration file (Yaml) bundle in the location: (config / packages) named: sonata_admin.yaml with the following content. In the configuration file you will be able to manage the panel’s appearance (see documentation).

6. At the end, follow the instructions below to clear the cache and install Assetic resources:

Wonderfoul! Your adminpanel should be visible after starting the address: http://your_url/admin.

Fave fun!