Skip to content

Commit 5faeded

Browse files
authored
Update link name
1 parent 3718fdb commit 5faeded

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/basic-usage/basic-usage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ $permission->removeRole($role);
5555
```
5656

5757
## Guard Name
58-
If you're using multiple guards then the `guard_name` attribute must be set as well. Read about it in the [using multiple guards](./multiple-guards) section of the readme.
58+
If you're using multiple guards then the `guard_name` attribute must be set as well. Read about it in the [using multiple guards](./multiple-guards) documentation.
5959

6060
## Get Permissions For A User
6161
The `HasRoles` trait adds Eloquent relationships to your models, which can be accessed directly or used as a base query:
@@ -108,7 +108,7 @@ $allRolesExceptAandB = Role::whereNotIn('name', ['role A', 'role B'])->get();
108108
## Counting Users Having A Role
109109
One way to count all users who have a certain role is by filtering the collection of all Users with their Roles:
110110
```php
111-
$superAdminCount = User::with('roles')->get()->filter(
112-
fn ($user) => $user->roles->where('name', 'Super Admin')->toArray()
111+
$managersCount = User::with('roles')->get()->filter(
112+
fn ($user) => $user->roles->where('name', 'Manager')->toArray()
113113
)->count();
114114
```

0 commit comments

Comments
 (0)