nagahnextdev/nextdashboard
Composer 安装命令:
composer require nagahnextdev/nextdashboard
包简介
Api for Dashbord
README 文档
README
NextDashboard is a customizable admin dashboard package built specifically for Laravel projects.
It provides out-of-the-box features including:
- Admin authentication system
- Role & permission management using Spatie Laravel-Permission
- A full-featured ticketing system
- Media management and activity logging via Spatie libraries
📦 Installation & Setup
1️⃣ Install the Package
composer require nagahnextdev/nextdashboard:dev-main
🔐 Authentication Setup
Update your config/auth.php file:
➕ Add the admin guard:
'admin' => [ 'driver' => 'token', 'provider' => 'admins', ],
➕ Add the admins provider:
'admins' => [ 'driver' => 'eloquent', 'model' => \nextdev\nextdashboard\Models\Admin::class, ],
🛡️ Spatie Permission Setup
php artisan vendor:publish --tag="permission-migrations" php artisan vendor:publish --tag="permission-config" php artisan migrate
📁 Media Library Setup
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations" php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-config"
Update your config/filesystems.php:
'disks' => [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', ], ]
Then link the storage:
php artisan storage:link
📝 Activity Log Setup
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations" php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-config" php artisan migrate
⚙️ Publish NextDashboard Resources
php artisan vendor:publish --tag=nextdashboard-migrations php artisan vendor:publish --tag=nextdashboard-seeders
🌱 Seed Initial Admin User
php artisan db:seed --class=PermissionSeeder php artisan db:seed --class=AdminSeeder
Note: Ensure that Spatie permissions are properly installed before running this seeder.
📢 Available Events
You can list all available events using:
php artisan nextdashboard:list-events
| Event Name | Description |
|---|---|
AdminCreated |
Triggered when a new admin is created |
RoleAssignedToAdmin |
Triggered when a role is assigned to an admin |
TicketCreated |
Triggered when a new ticket is created |
TicketAssigned |
Triggered when a ticket is assigned to an admin |
TicketReplied |
Triggered when a reply is added to a ticket |
🧹 Scheduled Commands
Clean up expired OTPs:
php artisan otps:delete-expired
Add this command to the scheduler in your
App\Console\Kernel.php.
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-16