Skip to content

Update README.md #11

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,17 @@

An authorization library that supports access control models like ACL, RBAC, ABAC for webman plugin

## 依赖

- [ThinkORM](https://www.workerman.net/doc/webman/db/others.html)(默认)
- [PHP-DI](https://github.com/PHP-DI/PHP-DI)
- [illuminate/database](https://www.workerman.net/doc/webman/db/tutorial.html)(可选)

## 安装
## Installation

```sh
composer require -W casbin/webman-permission
```

## 使用
## Configuration

### 1. 依赖注入配置
### 1. DI Configuration

修改配置`config/container.php`,其最终内容如下
`config/container.php`:

```php
$builder = new \DI\ContainerBuilder();
Expand All @@ -34,7 +28,7 @@ $builder->useAutowiring(true);
return $builder->build();
```

### 2. 数据库配置
### 2. database

> 默认策略存储是使用的ThinkORM。
> 如使用 laravel的数据库 [illuminate/database](https://github.com/illuminate/database),请按照官方文档按照相应的依赖包:https://www.workerman.net/doc/webman/db/tutorial.html
Expand Down