Skip to content

Commit a4c7ad1

Browse files
authored
Update README.md
1 parent 1b31dc6 commit a4c7ad1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ $user_role = createUserRole($roles, $user_id);
8282
echo $user_role;
8383
```
8484

85+
Update User Role
86+
```php
87+
$roles = array of roles from Obrainwave\AccessTree\Models\Role // array(2, 5);
88+
$user_id = id of a user from App\Models\User // 5;
89+
$user_role = updateUserRole($roles, $user_id);
90+
echo $user_role;
91+
```
92+
8593
Check User Access or Permission
8694
```php
8795
checkPermission(string slug_of_permission) // returns true or false

0 commit comments

Comments
 (0)