This repository was archived by the owner on Aug 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- # ThinkPHP-Casbin
1+ Think-Casbin
2+ ====
23
3- 一个专为ThinkPHP5.1定制的Casbin的扩展包( https://github.com/php-casbin/think-casbin )。
4+ [ ![ Latest Stable Version] ( https://poser.pugx.org/casbin/think-adapter/v/stable )] ( https://packagist.org/packages/casbin/think-adapter )
5+ [ ![ Total Downloads] ( https://poser.pugx.org/casbin/think-adapter/downloads )] ( https://packagist.org/packages/casbin/think-adapter )
6+ [ ![ License] ( https://poser.pugx.org/casbin/think-adapter/license )] ( https://packagist.org/packages/casbin/think-adapter )
7+
8+ 一个专为ThinkPHP5.1定制的[ Casbin] ( https://github.com/php-casbin/php-casbin ) 的扩展包( https://github.com/php-casbin/think-casbin )。
49
510### 安装
611
7- 在你的thinkphp项目里 ,通过` composer ` 安装这个扩展
12+ 在你的 ` ThinkPHP ` 项目里 ,通过` composer ` 安装这个扩展
813
914```
1015composer require casbin/think-adapter
@@ -39,7 +44,7 @@ $obj = 'data1'; // the resource that is going to be accessed.
3944$act = 'read'; // the operation that the user performs on the resource.
4045
4146if (true === Casbin::enforce($sub, $obj, $act)) {
42- // permit alice to read data1x
47+ // permit alice to read data1
4348 echo 'permit alice to read data1';
4449} else {
4550 // deny the request, show an error
You can’t perform that action at this time.
0 commit comments