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

Admin Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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.

Implementation Patterns

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.

Gotchas and Tips

  • Low adoption = limited support. With 3 stars and 0 dependents, expect to read 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 publish drift. Re-publishing views after an update can silently overwrite customizations. Diff published views against vendor/ after every upgrade, or avoid publishing unless necessary.
  • Migration collisions. Admin packages often ship user/role tables that clash with existing ones. Review migrations before running; you may need to skip ones your app already handles via --path or by conditionally loading.
  • Config cache. 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. Similar issue with route:cache — dynamic admin route registration may not serialize cleanly. Verify route:list still shows admin routes after caching in staging.
  • Asset publishing. Admin panels usually ship CSS/JS. Run vendor:publish --tag=admin-assets (check actual tag) after upgrades, and version-bust via a cache query string if the package doesn't.
  • Authorization gaps. Audit middleware on every registered route group. It's common for a package to protect index/show but leave bulk actions or export endpoints lightly guarded.
  • Debugging. Use 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).
  • Extension points. Prefer the package's documented hooks (field types, menu builders, view composers, events) over subclassing core classes. If hooks are missing, wrap the package rather than editing vendor/ — the latter is unrecoverable on composer update.
  • Exit strategy. Given the maturity level, isolate admin code behind your own service provider and avoid binding core app logic to the package's models or facade. Migrating to Filament, Nova, or a custom panel later should mean swapping the admin layer, not rewriting domain code.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect