Skip to content

Commit 61692e9

Browse files
authored
Update role-permissions.md
the `syncPermissions` method on the `Role` object was missing from this page
1 parent 2ec9bef commit 61692e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/basic-usage/role-permissions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ A permission can be revoked from a role:
8484
$role->revokePermissionTo('edit articles');
8585
```
8686

87+
Or revoke & add new permissions in one go:
88+
89+
```php
90+
$role->syncPermissions(['edit articles', 'delete articles']);
91+
```
92+
8793
The `givePermissionTo` and `revokePermissionTo` functions can accept a
8894
string or a `Spatie\Permission\Models\Permission` object.
8995

0 commit comments

Comments
 (0)