File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -59,21 +59,23 @@ composer require windhoney/yii2-rest-rbac
59
59
60
60
61
61
* ** 创建所需要的表**
62
- ###### 1. 用户表user和菜单表menu
62
+ > ###### 1. 用户表user和菜单表menu
63
63
``` php
64
64
yii migrate --migrationPath=@vendor/windhoney/yii2-rest-rbac/migrations
65
65
```
66
- ###### 2. rbac相关权限表
66
+ > ###### 2. rbac相关权限表
67
67
``` php
68
68
yii migrate --migrationPath=@yii/rbac/migrations/
69
69
```
70
+
70
71
> ** _ ** ` auth_item ` 表添加一个字段 ` parent_name ` varchar(30) COLLATE utf8_unicode_ci DEFAULT '' COMMENT '父级名称'** _ ** ,
71
72
###### 3. oauth2相关表
73
+
72
74
``` php
73
75
yii migrate --migrationPath=@vendor/filsh/yii2-oauth2-server/migrations
74
76
```
75
77
76
- ###### 4. 新增分组表
78
+ > ###### 4. 新增分组表
77
79
78
80
``` mysql
79
81
CREATE TABLE `auth_groups ` (
@@ -100,16 +102,16 @@ CREATE TABLE `auth_groups_child` (
100
102
101
103
* ** 添加路由配置**
102
104
103
- > 将yii2-rest-rbac/example/rbac_route.php文件内容配置到项目的urlManager的rules规则下
104
- 也可在main .php文件中 添加
105
+ > * 将yii2-rest-rbac/example/rbac_route.php文件内容配置到项目的urlManager的rules规则下
106
+ > * 或者在main .php文件中 添加
105
107
``` php
106
108
$dir = __DIR__ . "/route";
107
109
$main = wind\rest\helper\RbacHelper::addRoute($dir, $main);
108
110
return $main;
109
111
```
110
- > 直接将此文件放到config /route/rbac_route.php
112
+ >> 并将此文件放到config /route/rbac_route.php
111
113
112
114
* ** 接口文档参考**
113
115
114
- > [ 文档] ( https://windhoney.gitbooks.io/yii2-rest-rbac/ )
116
+ * [ 文档] ( https://windhoney.gitbooks.io/yii2-rest-rbac/ )
115
117
You can’t perform that action at this time.
0 commit comments