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

Laravel Admin Core Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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:

  1. Publish and read the config — 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.
  2. Publish migrations and run them — 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.
  3. Run the install/seeder command — the package ships an installer (look for 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.
  4. Where to look first if something is blank: the package's 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.

Implementation Patterns

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.

Gotchas and Tips

  • Treat 4.0.1 as a fresh install, not an upgrade. The release note is one line, which means the changelog tells you nothing about what else moved. Between 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.
  • The one-line changelog is the headline risk. "Add Laravel 13 support" as a major-version bump strongly implies dropped support for older Laravel/PHP versions. Pin ^4.0 deliberately, and check composer show balajidharma/laravel-admin-core for the actual constraint set after install.
  • Config caching bites during setup. After changing anything in the published config, run 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.
  • Route name and URL collisions. If your app already defines 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.
  • Migration ordering with an existing 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.
  • Permission and menu caches. Role/permission changes often need an explicit cache flush (Spatie's 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.
  • Asset publishing and version pinning. After a major upgrade, republish public assets and hard-refresh; stale CSS/JS from v3 is a classic post-upgrade red herring.
  • Debugging a blank panel. In order: is the route registered, does the guard resolve a user, does that user have the panel's base permission, does the layout resolve? Log the resolved guard/user in a temporary middleware — faster than reading package internals.
  • Extension points to prefer, in order of safety: config → service provider registrations (menus, permissions) → subclassed controllers → published views → editing vendor files (never). The further down that list you go, the more a 4.1 release will cost you.
  • Watch the repo, not just the changelog. With terse release notes, the compare link (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.
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.
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus