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 Laravel Package

nasirkhan/laravel-admin

Laravel Admin by Nasir Khan provides a ready-made backend dashboard for Laravel apps, with authentication, CRUD scaffolding, role and permission handling, and configurable modules to help you build admin interfaces faster.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer: composer require nasirkhan/laravel-admin. Laravel package discovery registers the service provider; if you've disabled discovery, add the provider manually to config/app.php (or bootstrap/providers.php on Laravel 11).
  • Publish the package's config, assets, migrations, and views using the vendor publish tags documented in the README. Commit the published config and any views you plan to customize before touching them.
  • Run the package migrations and any role/permission seeders, then create your first admin user. The package wires up authentication and authorization via spatie/laravel-permission, so seed the role and permission tables as part of setup.
  • Look first at:
    • config/laravel-admin.php — routing, middleware, branding, dashboard and menu settings.
    • resources/views/vendor/laravel-admin/ — the publishable Blade layer (layout, partials, dashboard).
    • The package service provider and route file — to see what routes and middleware get registered.
  • First practical use case: log into the default dashboard, then follow the v2.3.0 guidance to override the dashboard with an application-owned view. That override is the entry point to branding and custom widgets.

Implementation Patterns

  • Vendor view override. Mirror the package's view path under resources/views/vendor/laravel-admin/... and only override the files you actually need. Everything else stays upgradeable. This is the pattern the v2.3.0 docs formalized for the dashboard.
  • Dashboard customization. Create an application Blade view, register it per the v2.3.0 documented approach (or point the relevant config key at it), and keep the package default view available as a reference. Compose the view from partials and components so widgets can be added or swapped without rewriting the layout.
  • CRUD workflow. For each new admin-managed model: follow the package's existing CRUD structure (controller, requests, views, routes), place your controller and views in the app namespace, and register routes so they resolve before any package catch-all. Keep controllers thin and delegate querying/filtering to services or query scopes.
  • Route protection. Attach your app's admin middleware (auth, admin guard, role/permission checks) via the package config or a wrapping route group. Verify the final stack with php artisan route:list rather than assuming.
  • Config-driven behavior. For environment-specific values (branding, pagination, menu entries), use the published config keys rather than hard-coding in views or controllers. This keeps customization visible and reversible.
  • Custom dashboard controller. If the default controller's data isn't sufficient, register your own route ahead of the package's, or override the route through config. Delegate data prep to services/view composers so the controller stays a thin adapter.
  • Day-to-day RBAC. Use the seeded roles and permissions to gate menu items and actions. Prefer checking permissions in middleware/Blade directives rather than conditional logic scattered across controllers — the package's menu system typically respects these gates.
  • Upgrade workflow. Pin ^2.3, run composer update nasirkhan/laravel-admin, then smoke-test admin login, dashboard, and one CRUD module. Diff your overridden views against the new package defaults on each bump. v2.3.0 is documentation-only, so upgrading from 2.2.x is a lockfile bump with no migration or config changes expected.

Gotchas and Tips

  • Never edit vendor/. Publish and override in the host app. Fork only as a last resort — it's the most expensive long-term maintenance outcome for an admin panel.
  • Cache-bust after changes. The three you'll need constantly:
    • php artisan view:clear
    • php artisan config:clear
    • php artisan route:clear If your dashboard override doesn't appear, stale compiled views are the first suspect, followed by a path/namespace mismatch in the view override.
  • Verify the exact view path and namespace. The most common override failure is a typo'd vendor view directory or filename. Confirm against the package's actual view namespace before creating the file.
  • Route precedence. A custom dashboard that "doesn't render" is often a routing issue, not a Blade issue. If the package controller returns its own view directly, a Blade override alone won't take effect — you'll need to override the route or the config that points at the view. Check order with php artisan route:list.
  • Run php artisan view:cache in staging. It catches Blade syntax and missing @include errors that won't surface until production otherwise.
  • Commit before publishing. vendor:publish can overwrite local customizations. Commit your overrides to VCS first so a careless re-publish is recoverable.
  • Override drift is the real cost. Once you publish a view, upstream changes to that view no longer propagate. Track your overrides in an upgrade checklist and diff them against package defaults on each release.
  • Dependency drift risk. Watch the supported Laravel version range and the spatie/laravel-permission constraint. Upgrading the host app's Laravel major version is the most likely trigger for a break — pin and test in a branch first.
  • Guard/multi-tenant caveats. The default setup assumes a single admin guard. Multi-guard or multi-tenant deployments may need explicit configuration; verify the dashboard override works for each guard rather than assuming it inherits correctly.
  • Debugging toolkit. php artisan route:list for route precedence, php artisan about for environment/version sanity, and storage/logs/laravel.log for what the package is actually doing. If the default dashboard renders instead of your view, re-check the view name before changing code.
  • Extension points, in order of preference: published views → published config → middleware configuration → route overrides → service provider bindings/events. Only reach for container bindings or events when the higher layers don't cover the need.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle