Skip to content

Commit 932e76e

Browse files
authored
Update README.md
1 parent 4c92150 commit 932e76e

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,18 @@ $create = createAccess($data, 'permission');
3636
echo $create;
3737
```
3838

39-
Create a Role
39+
Update a Permission
40+
```php
41+
$data = [
42+
'data_id' => permission id // 3,
43+
'name' => 'Add User',
44+
'status' => 1 or 0
45+
];
46+
$update = updateAccess($data, 'permission');
47+
echo $update;
48+
```
49+
50+
Create Roles
4051
```php
4152
$data = [
4253
'name' => 'Admin',
@@ -47,6 +58,18 @@ $create = createAccess($data, 'role', $permission_ids);
4758
echo $create;
4859
```
4960

61+
Update Roles
62+
```php
63+
$data = [
64+
'data_id' => role id // 5,
65+
'name' => 'Admin Staff',
66+
'status' => 1 or 0
67+
];
68+
$permission_ids = array of permission ids // array(10, 6, 3);
69+
$update = updateAccess($data, 'role', $permission_ids);
70+
echo $update;
71+
```
72+
5073
Create User Role
5174
```php
5275
$roles = array of roles // array(2, 5);

0 commit comments

Comments
 (0)