Download the PHP package nasirkhan/laravel-admin without Composer
On this page you can find all versions of the php package nasirkhan/laravel-admin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-admin
laravel-admin
A Tailwind CSS / Flowbite backend shell for Laravel — sidebar, header, breadcrumb layout.
This package provides the structural layout (sidebar, top navigation, main content wrapper) for a Laravel admin panel. It is designed to work alongside laravel-cube for UI components, but the core layout works independently.
Requirements
- PHP ^8.2
- Laravel 11 / 12 / 13
- Tailwind CSS v4 + Flowbite (compiled via Vite in the host application)
Installation
The service provider is auto-discovered.
Publish assets
Publish the config file:
Publish the views (only if you need to customise them):
Configuration
After publishing, edit config/admin.php:
Supported icon values: home, users, shield, bell, cog.
What's included
Beyond the layout shell, the package ships a complete backend for the three core resources:
| Resource | Routes (prefix admin/) |
Controller |
|---|---|---|
| Dashboard | GET /, GET /dashboard |
BackendController |
| Users | CRUD + block/unblock/trash/restore/change-password | UserController |
| Roles | CRUD + permission sync | RolesController |
| Notifications | index / show / mark-all-read / delete-all | NotificationsController |
All routes are named under the backend. prefix (e.g. backend.users.index) and protected by the auth and can:view_backend middleware.
Four Livewire components are registered by the package:
| Alias | Class |
|---|---|
admin.dashboard |
Nasirkhan\Admin\Livewire\AdminDashboard |
admin.notifications |
Nasirkhan\Admin\Livewire\Notifications |
backend.users-index |
Nasirkhan\Admin\Livewire\UsersIndex |
backend.roles-index |
Nasirkhan\Admin\Livewire\RolesIndex |
Controllers intentionally keep use App\Models\User and use App\Models\Role — models stay in the host application.
Customising views
Published views in the host application always take precedence over the package defaults. You can override any view without touching the package.
Publish all views at once
Files land in resources/views/vendor/admin/ with the same structure as the package:
Publish selectively
Copy only the files you need to override. For example, to override just the user edit form:
Laravel resolves admin::users.edit by looking in resources/views/vendor/admin/ first, then falling back to the package.
Publish everything (views + config + routes)
Adding columns to the users table
To add a new field (e.g. phone) to user management:
1. Create and run a migration
2. Add the column to $fillable in App\Models\User
3. Publish the views you need to change (if not already published)
4. Edit the published views
resources/views/vendor/admin/users/create.blade.php— add the form fieldresources/views/vendor/admin/users/edit.blade.php— add the field with its old/current valueresources/views/vendor/admin/users/show.blade.php— add a display row
5. Optional — make the column visible in the listing
Publish and edit resources/views/vendor/admin/livewire/users-index.blade.php to add a column to the table. If the column also needs to be searchable or sortable, publish the Livewire component class by copying it into your app and re-registering it in a service provider:
Customising the Dashboard
The dashboard is powered by the admin.dashboard Livewire component (AdminDashboard class) and its view admin::livewire.dashboard. Both are designed to be overridden without touching the package.
Remove the demo data
The default dashboard includes a demo data include. To remove it, publish the main dashboard view and delete the include line:
Then open resources/views/vendor/admin/index.blade.php and remove:
Add or change stat cards (view only)
If you only need to change the layout or copy of the cards — no new database queries — override just the Livewire view:
Edit the published file. Each card follows this structure:
The grid wrapping the cards uses grid-cols-1 sm:grid-cols-2 lg:grid-cols-5. Adjust the last class to match the number of cards you have (e.g. lg:grid-cols-3 for three cards).
Add a card that needs new data (class + view)
When a new card needs a count or query that the base component does not expose, extend AdminDashboard and re-register the alias.
1. Create the extended component
2. Re-register the Livewire alias
Because AppServiceProvider boots after AdminServiceProvider, registering the alias again replaces the package's class:
3. Override the view and add the card
Publish the Livewire view (if you haven't already) and add a new card block that references $commentsCount:
Then add a card for {{ $commentsCount }} inside the grid in the published file.
Overriding the Notifications component
The same pattern applies to the Notifications component:
| What to override | Path |
|---|---|
| View only | resources/views/vendor/admin/livewire/notifications.blade.php |
| Class | Extend Nasirkhan\Admin\Livewire\Notifications, re-register admin.notifications |
Usage
Extend the admin layout in your backend Blade views:
Layout slots
| Section / Stack | Purpose |
|---|---|
title |
Browser tab / page title |
breadcrumbs |
Rendered inside the top navbar |
content |
Main page body |
@stack('styles') |
Extra <style> or <link> tags in <head> |
@stack('scripts') |
Extra <script> tags before </body> |
Vite setup
The layout expects two Vite entry points compiled in the host application:
app-backend.css should import Tailwind CSS v4 and Flowbite:
Optional integrations
| Package | Effect |
|---|---|
nasirkhan/laravel-cube |
Enables language switcher, Google Analytics, and dynamic menu components |
nasirkhan/module-manager |
Enables database-driven dynamic sidebar navigation |
These integrations are detected at runtime — the layout degrades gracefully without them.
Dark mode
Dark mode is toggled via a button in the top navbar and persisted in localStorage under the key color-theme. The <html> tag receives the dark class (Tailwind class-based dark mode).
License
GPL-3.0-or-later — see LICENSE.
All versions of laravel-admin with dependencies
illuminate/notifications Version ^11|^12|^13
illuminate/routing Version ^11|^12|^13
illuminate/support Version ^11|^12|^13