php: >=8.0
laravel/nova: ^4.1
Install the package in a Laravel Nova project via Composer:
composer require mttzzz/dk-role-permission-tool
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan vendor:publish --provider="Mttzzz\DkRolePermissionTool\ToolServiceProvider"
php artisan migrate
php artisan dk-role-permission:seed
add meunu in NovaServiceProvider
use Mttzzz\DkRolePermissionTool\DkRolePermissionTool;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
public function boot()
{
parent::boot();
Nova::mainMenu(function (Request $request) {
return [
.....
(new DkRolePermissionTool)->menu($request),
.....
];
});
This project is open-sourced software licensed under the MIT license.