Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Adminbundle Laravel Package

bluebear/adminbundle

View on GitHub
Deep Wiki
Context7

Admin

An Admin is an object responsible to load the required data for the current action. When an Admin url is called, the Admin factory create an Admin according the route configuration and the Admin configuration.

Then the Admin handle the request, dispatch some events and execute several actions to gather data to display the wanted view.

Resources path

The AdminBundle configuration works like the Serializer component : the configuration files are located in a special directory (which can be changed using the AdminBundle configuration). By default, it will read all .yaml files in the config/admin/resources directory of your project.

Most times, you do not require to change this directory. But you change it using the following configuration :

# config/packages/lag_admin.yaml
lag_admin:
    application:
        resources_path: my-custom-directory

Basic configuration

The basic configuration for an Admin is the following :

# config/admin/resources/article.yaml
article:
    entity: App\Entity\Article 
    actions:
        create: ~
        edit: ~
        list: ~
        delete: ~

This will create CRUD views for the entity App\Entity\Article with the default configuration. This default configuration is useful for most needs. However, sometimes more customization is required. See the Customization documentation to learn more about it.

While you can add several Admin in one file, it is recommended to use one file per Admin, for readability reasons.

config
    |
    --- admin
        |
        --- resources
                     |
                     --- article.yaml       
                     --- category.yaml
                     --- comment.yaml

Under the hood

Admins are created by the LAG\AdminBundle\Metadata\Factory\AdminFactory when the controller LAG\AdminBundle\Controller\AdminAction is called by the routing.

Full configuration

The full configuration reference for an Admin is available here.

Now it's time to configure each actions.

Previous: Basics

Next: Actions

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums