bfg/admin
bfg/admin is a Laravel package for adding an admin panel to your application. It supports back-office screens and CRUD-style resource management, helping teams build internal tools faster with less boilerplate while staying within familiar Laravel conventions.
Install via Composer and let the package publish its scaffolding:
composer require bfg/admin
php artisan vendor:publish --provider="Bfg\\Admin\\AdminServiceProvider"
php artisan migrate
Because this package is a full admin layer rather than a small utility, the first thing to inspect is the published config (config/admin.php or similar) and the package's src/ directory. With only a handful of stars, the README may lag behind the code — treat the source as the source of truth. Use:
php artisan vendor:publish --list # see what tags exist
php artisan route:list | grep admin # confirm routes registered
Seed or create an admin user, then hit the configured admin prefix (commonly /admin). The first real use case is scaffolding CRUD for a single model: register the model in the package's admin configuration or generate a resource, point it at a table, and confirm list/create/edit/delete flows work end to end before wiring menus or roles. Do this on a throwaway branch against a scratch database — there are too few dependents for the migrations to be battle-tested.
Verify authentication and authorization middleware are applied to the admin routes before exposing anything to non-local traffic.
Resource registration. Most packages of this shape expect you to declare admin resources (model, fields, columns) in a config file or a service provider. Keep these declarations in a dedicated AdminServiceProvider or a config/admin_resources.php rather than scattering them — it makes the package upgradable and easy to rip out later.
Menu and navigation. Define menu entries in config, not in Blade. Group by domain (Users, Content, Settings) so the admin scales beyond 3–4 resources. If the package supports nested menus, prefer shallow nesting — deep trees are where these packages usually break.
Custom fields / form widgets. When you outgrow the built-in field types, extend via the package's field registry (or a custom Blade partial) instead of editing published views directly. Published views are overwritten on vendor:publish --force; custom partials in resources/views/admin/ survive.
Authorization. Wire the package into Laravel Gates/Policies. Even if the admin ships its own role system, mirror it to policies so your application code and background jobs use the same permission source. Guard destructive actions (delete, impersonate) behind explicit abilities.
Local dev workflow. Use a seeder that creates an admin user and one demo record per resource. It's the fastest way to iterate on field types and table formatting without manually clicking through forms.
Integration with app models. Keep business logic in your Eloquent models and actions; treat admin controllers as thin adapters. When the package's controller conventions conflict with yours, override the controller in your app namespace and re-point the route rather than forking the package.
vendor/bfg/admin/src when docs fail. Pin an exact version in composer.json and commit composer.lock; minor releases may not follow semver strictly.vendor/ after every upgrade, or avoid publishing unless necessary.--path or by conditionally loading.php artisan config:cache will freeze admin resource definitions. If resources are registered dynamically in a provider, clear the cache (php artisan optimize:clear) between additions or move registration out of config.route:cache — dynamic admin route registration may not serialize cleanly. Verify route:list still shows admin routes after caching in staging.vendor:publish --tag=admin-assets (check actual tag) after upgrades, and version-bust via a cache query string if the package doesn't.php artisan route:list --path=admin, check storage/logs/laravel.log for the package's own logging channel, and set APP_DEBUG=true locally to surface Blade errors in admin views (the package's error handling can swallow exceptions into a generic flash message).vendor/ — the latter is unrecoverable on composer update.How can I help you explore Laravel packages today?