We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8870fec commit 642f10dCopy full SHA for 642f10d
README.md
@@ -26,17 +26,27 @@ php artisan vendor:publish --tag="access-tree-config"
26
27
## Usage
28
29
-#Create a Permission or Role
+Create a Permission
30
```php
31
$data = [
32
- 'data_id' => 5,
33
- 'name' => 'See Auth',
34
- 'status' => 1
+ 'name' => 'Add User',
+ 'status' => 1 or 0
35
];
36
$create = createAccess($data, 'permission');
37
echo $create;
38
```
39
+Create a Role
40
+```php
41
+$data = [
42
+ 'name' => 'Admin',
43
44
+ ];
45
+$permission_ids = [1, 5, 4];
46
+$create = createAccess($data, 'role', $permission_ids);
47
+echo $create;
48
+```
49
+
50
## Changelog
51
52
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
0 commit comments