PHP code example of betterde / permission

1. Go to this page and download the library: Download betterde/permission 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/ */

    

betterde / permission example snippets





return [
    // 自定义模型
    'model' => Betterde\Role\Models\Permission::class,
    // 自定义数据表
    'table' => 'permission',
    // 自定义缓存
    'cache' => [
        // 是否开启缓存
        'enable' => true,
        // 缓存命名空间前缀
        'prefix' => 'betterde',
        // 缓存的数据库配置
        'database' => 'cache'
    ]
];

php artisan vendor:publish --tag=permission

// 缓存系统权限到Redis
php artisan role:cache

// 清空缓存
php artisan role:flush