balajidharma/laravel-admin-core
Laravel Admin Core provides foundational admin panel features for Laravel applications, including admin authentication, role and permission management, menu and settings modules, and reusable CRUD scaffolding to speed up secure, customizable back-office development.
Requirements first — this is a major bump. v4.0.1 exists to add Laravel 13 support, and the jump from 3.0.22 to 4.0.1 signals a new compatibility floor. Before running composer require, confirm your app is actually on Laravel 13 and the PHP version that implies (typically 8.3+/8.4+). If you're on Laravel 10/11/12, pin to the 3.x line — do not assume ^4.0 installs cleanly on older frameworks.
composer require balajidharma/laravel-admin-core:^4.0
Then, in order:
php artisan vendor:publish --tag=admin-core-config (verify the exact tag with php artisan vendor:publish and pick from the list). The config file is the real documentation for this package: route prefix, middleware stack, guard, layout/theme, and table names all live there. Read it end to end before touching anything else.vendor:publish --tag=admin-core-migrations then php artisan migrate. Check the published files for table prefixes; if your app already has users, roles, or permissions tables, resolve the collision now rather than after a failed migration.admin:install or similar in php artisan list | grep admin) that seeds roles, permissions, and a first admin user. Run it, then log in at the configured route prefix.routes/ file, its published config/, and the layout blade it resolves. Nine times out of ten the panel renders but is empty because a menu provider or the auth guard isn't wired — not because of a bug.First use case: stand up a single /admin panel behind an existing guard, add one menu entry pointing at one of your app's Eloquent resources as a read-only list, and confirm permissions gate it. That exercises config, routes, menu registration, and authorization in one pass — the four things that break in real integrations.
Menu registration. Menus are the package's primary extension surface. Register items from a service provider (or the package's designated menu file) rather than editing published views, so upgrades don't clobber your navigation. Build menu entries as data — label, route/URL, icon, ordering, permission slug — and let the package render them. Group by domain area and keep ordering explicit; implicit ordering based on registration sequence gets fragile once you have multiple providers.
Resource CRUD. The intended workflow is to extend the package's base controller/resource rather than hand-rolling admin controllers. Subclass it, point it at your model, declare columns/form fields, and let the package handle listing, pagination, filtering, and the create/edit/delete flows. This keeps authorization, breadcrumbs, and flash messaging consistent across screens. When the base class doesn't cover a case, override the single method you need instead of replacing the whole controller — that's what keeps you upgradeable.
Authorization. The package layers on top of a roles/permissions backend (Spatie's is the usual suspect — verify via composer show). Gate admin routes by middleware in the config's middleware array, and gate individual menu items and actions by permission slug. Keep your policy layer as the source of truth for record-level access and let the package's permission middleware handle route-level access; conflating the two produces admin panels where a user sees a menu item they can't actually open.
Overriding views and assets. Publish only the views you need to change (vendor:publish --tag=admin-core-views) and leave the rest reading from vendor/. Full publishes are convenient on day one and a merge headache on every upgrade. If you need styling changes, prefer a custom layout that @extends the package layout over editing its blade directly.
Integration with an existing app. Two common shapes: (a) a dedicated admin guard with its own provider, isolated from your customer-facing auth; (b) reuse the existing web guard and differentiate purely by permissions. (a) is safer for anything with real operational blast radius. Either way, set the guard and middleware in the config once — scattering auth:admin through route files leads to inconsistent redirects on session expiry.
Testing. Wrap admin feature tests in a seeded permission fixture and assert on both the happy path and the 403. Admin code is unusually easy to test badly (asserting a 200 on a dashboard while every CRUD action is untested) — cover at least one create/update/delete cycle per resource.
3.0.22 and 4.0.1 there may be renamed config keys, changed route names, new/removed middleware, or dropped PHP versions that aren't mentioned. Diff config/ and routes/ against your v3 copies in vendor/ before deploying. If you're upgrading an existing panel, budget time for exactly this.^4.0 deliberately, and check composer show balajidharma/laravel-admin-core for the actual constraint set after install.php artisan config:clear (and route:clear, view:clear). Symptom of forgetting: your middleware or route-prefix change appears to do nothing in local dev, or works locally and fails in CI.admin.* route names or an /admin prefix, registration order decides the winner and the failure mode is a silent 404. Check php artisan route:list | grep admin after installing.users table. The package may ship a users migration assuming a fresh schema. If you already have one, delete or adjust the published migration rather than skipping it — skipping it can leave role/permission pivot foreign keys pointing at a table with the wrong columns.php artisan permission:cache-reset). Same for menus if the package caches them. "I added a menu item and it didn't appear" is nearly always a cache, not a bug.4.1 release will cost you.v3.0.22...v4.0.1) and the migration guide — if one exists — are worth reading before you commit. If no upgrade guide was published, assume there isn't one and plan a staging deploy first.How can I help you explore Laravel packages today?