Skip to content

Commit 682a657

Browse files
authored
Update README.md
1 parent c78c418 commit 682a657

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,12 @@ return $builder->build();
3939
> 默认策略存储是使用的ThinkORM。
4040
> 如使用 laravel的数据库 [illuminate/database](https://github.com/illuminate/database),请按照官方文档按照相应的依赖包:https://www.workerman.net/doc/webman/db/tutorial.html
4141
42-
#### 🚀 (1) 模型配置
42+
**模型配置**
4343

44-
使用ThinkORM(默认)
45-
> 修改数据库 `thinkorm.php` 配置
44+
默认使用ThinkORM。修改数据库 `thinkorm.php` 配置
4645

47-
使用laravel数据库(可选)
48-
> - 修改数据库 `database.php` 配置
49-
> - 修改数据库 `permission.php``adapter`适配器为laravel适配器
46+
**创建 `casbin_rule` 数据表**
5047

51-
#### 🔰 (2) 创建 `casbin_rule` 数据表
5248
```sql
5349
CREATE TABLE `casbin_rule` (
5450
`id` BIGINT ( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -70,8 +66,6 @@ CREATE TABLE `casbin_rule` (
7066
) ENGINE = INNODB CHARSET = utf8mb4 COMMENT = '策略规则表';
7167
```
7268

73-
#### 📚 (3) 配置 `config/redis` 配置
74-
7569
## 重启webman
7670

7771
```
@@ -109,9 +103,9 @@ if (Permission::enforce("eve", "articles", "edit")) {
109103
}
110104
```
111105

112-
多套配置
106+
### 多套配置
113107
```php
114-
$permission = Permission::client("other_conf")
108+
$permission = Permission::client("restful_conf")
115109
// adds permissions to a user
116110
$permission->addPermissionForUser('eve', 'articles', 'read');
117111
// adds a role for a user.
@@ -157,4 +151,4 @@ if (is_null(static::$_manager)) {
157151
}
158152
```
159153
耦合太高,不建议这么搞,更多了解:https://www.workerman.net/doc/webman/di.html
160-
</details>
154+
</details>

0 commit comments

Comments
 (0)