定制 georgie/php-rbac 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

georgie/php-rbac

Composer 安装命令:

composer require georgie/php-rbac

包简介

php的rbac包

README 文档

README

本扩展包是php的rbac包,在TP5进行测试

安装方法

composer require georgie/php-rbac dev-master

由于依赖了think-orm和think-cache,需要进行配置

如果使用的是thinkphp框架请参考:

php使用

Cache::config([
    'default' => 'file',
    'stores' => [
        'file' => [
            'type' => 'File',
            // 缓存保存目录
            'path' => './cache/',
            // 缓存前缀
            'prefix' => '',
            // 缓存有效期 0表示永久缓存
            'expire' => 0,
        ],
        'redis' => [
            'type' => 'redis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'prefix' => '',
            'expire' => 0,
        ],
    ],
]);
Db::setConfig([
    'default' => 'mysql',
    'connections' => [
        'mysql' => [

            // 数据库类型
            'type' => 'mysql',
            // 主机地址
            'hostname' => 'www.georgie.cn',
            // 数据库名
            'database' => 'php_rpac_test',
            // 用户名密码
            'username' => 'php_rpac_test',
            'password' => 'dZWrXAsazZzKhfmP',
            // 数据库编码默认采用utf8
            'charset' => 'utf8',
            // 数据库表前缀
            'prefix' => 'think_',
            // 数据库调试模式
            'debug' => true,
        ]
    ]
]);

$rbac = new Rbac();

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-18