1. Go to this page and download the library: Download jackchow/rbac 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/ */
jackchow / rbac example snippets
namespace app\admin\model;
use Jackchow\Rbac\RbacRole;
class Roles extends RbacRole
{
}
namespace app\admin\model;
use Jackchow\Rbac\RbacPermission;
class Permissions extends RbacPermission
{
}
namespace app\admin\model;
use think\Model;
use Jackchow\Rbac\Traits\RbacUser;
class Admins extends Model
{
use RbacUser;
protected $hidden=['password','created_at','updated_at'];
}