PHP code example of mttzzz / dk-role-permission-tool

1. Go to this page and download the library: Download mttzzz/dk-role-permission-tool library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mttzzz / dk-role-permission-tool example snippets


use Mttzzz\DkRolePermissionTool\DkRolePermissionTool;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
    public function boot()
    {
        parent::boot();

        Nova::mainMenu(function (Request $request) {
            return [
            .....
            (new DkRolePermissionTool)->menu($request),
            .....
             ];
    });
bash
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
bash
php artisan vendor:publish --provider="Mttzzz\DkRolePermissionTool\ToolServiceProvider"
bash
php artisan migrate
bash
php artisan dk-role-permission:seed