Download the PHP package lihq1403/think-rbac without Composer

On this page you can find all versions of the php package lihq1403/think-rbac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package think-rbac

think-rbac

thinkphp6的rbac权限控制系统 基于mysql

安装

1、首先用composer安装

2、发布资源

会生成一个rbac.php的配置文件在config目录下

3、数据迁移

然后就会发现数据库多了5张表,表字段具体内容可看代码

4、使用

在你需要用到权限的用户model里面,引入use RbacUser;

这样就算是可以开始使用了

直接使用

提供了controller,只需要定义路由就好了,比如

自定义使用

实例化

权限组

增加权限组
编辑权限组
删除权限组

角色

添加角色
编辑角色
删除角色
禁用角色
获取所有角色,分页显示
获取角色所有权限组,已拥有和未拥有

角色-权限组

分配权限
收回权限
修改角色权限,已有未被选择会被删除,未有已选择会新增

用户-角色

先查找用户
分配角色
收回角色
差值分配角色
用户所有角色

权限检查 传入用户id,一般配合中间件来使用

例子

日志相关

保存日志
日志列表获取

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT


All versions of think-rbac with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
topthink/framework Version ^6.0
topthink/think-migration Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lihq1403/think-rbac contains the following files

Loading the files please wait ....