ravisaini / admin-dashboard
Laravel package to install a multi-theme admin dashboard with authentication, SweetAlert support, and modular layout.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: ^8.1
- illuminate/auth: ^11.0|^12.0
- illuminate/routing: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
README
A plug-n-play Laravel package to instantly scaffold an Admin Panel with full authentication, theme setup, guard configuration, and controller-routing views — all in a single command!
Requirements
- PHP >= 8.1
- Laravel >= 11.0
🎯 Features
- 🔐 Admin authentication (via
users
or customadmins
table) - 🎨 Ready-to-use theme (Otika included)
- 🛡️ Admin guard (
admin
) auto-configured - ⚙️ One command to publish config, assets, views, routes, controllers
- 👤 Create admin user during install
- 🚀 Works out-of-the-box!
📦 Installation
Step 1: Install via Composer
composer require ravi-saini/admin-dashboard
Step 2: Run Installation Command
php artisan admin:install
The installation process will guide you through:
- Theme Selection
- Authentication Table Choice
- Admin User Creation
Example installation flow:
📦 Installing Admin Dashboard...
🎨 Select admin theme
[0] theme1
> 0
Authentication table [users]:
[0] users
[1] admins
> 1
Adding 'admin' guard to config/auth.php...
Creating 'Admin' model and 'admins' table...
Running migration...
INFO Running migrations.
2025_06_09_171108_create_admins_table ...................................... 29.61ms DONE
📧 Enter admin email:
> admin@gmail.com
🔐 Enter admin password:
> ••••••••
Creating admin user in 'admins' table...
✅ Admin user created successfully!
✅ Admin dashboard installed and configured!
INFO Publishing [admin-controllers] assets.
Copying directory [packages/AdminDashboard/src/Http/Controllers] to [app/Http/Controllers/AdminDashboard] DONE
🔧 Configuration
The package will automatically:
- Configure the admin guard
- Create necessary database tables
- Set up authentication
- Publish required assets and views
Middleware Configuration
Add these lines in your bootstrap/app.php
file to handle authentication redirects:
$middleware->redirectGuestsTo(fn() => route('admin.login')); $middleware->redirectUsersTo(fn() => route('admin.dashboard'));
This ensures:
- Unauthenticated users are redirected to the login page
- Authenticated users are redirected to the dashboard
🚀 Usage
After installation, you can access your admin panel at:
http://your-app.com/admin/login
Login with the credentials you provided during installation.
📝 License
The MIT License (MIT). Please see License File for more information.