Skip to content

Commit a2965a4

Browse files
authored
Merge pull request #2723 from KamilWojtalak/main
[Docs] normalize variable naming in examples
2 parents 4dd1ab7 + 581c628 commit a2965a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/basic-usage/basic-usage.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ The scope can accept a string, a `\Spatie\Permission\Models\Permission` object o
9898
Since Role and Permission models are extended from Eloquent models, basic Eloquent calls can be used as well:
9999

100100
```php
101-
$all_users_with_all_their_roles = User::with('roles')->get();
102-
$all_users_with_all_their_direct_permissions = User::with('permissions')->get();
103-
$all_roles_in_database = Role::all()->pluck('name');
104-
$users_without_any_roles = User::doesntHave('roles')->get();
105-
$all_roles_except_a_and_b = Role::whereNotIn('name', ['role A', 'role B'])->get();
101+
$allUsersWithAllTheirRoles = User::with('roles')->get();
102+
$allUsersWithAllTheirDirectPermissions = User::with('permissions')->get();
103+
$allRolesInDatabase = Role::all()->pluck('name');
104+
$usersWithoutAnyRoles = User::doesntHave('roles')->get();
105+
$allRolesExceptAandB = Role::whereNotIn('name', ['role A', 'role B'])->get();
106106
```
107107

108108
## Counting Users Having A Role

0 commit comments

Comments
 (0)