You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/authorization.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -111,14 +111,19 @@ The `Authorizable` trait on the `User` entity provides the following methods to
111
111
112
112
#### can()
113
113
114
-
Allows you to check if a user is permitted to do a specific action. The only argument is the permission string. Returns
114
+
Allows you to check if a user is permitted to do a specific action or group or actions. The permission string(s) should be passed as the argument(s). Returns
115
115
boolean `true`/`false`. Will check the user's direct permissions (**user-level permissions**) first, and then check against all of the user's groups
116
116
permissions (**group-level permissions**) to determine if they are allowed.
117
117
118
118
```php
119
119
if ($user->can('users.create')) {
120
120
//
121
121
}
122
+
123
+
// If multiple permissions are specified, true is returned if the user has any of them.
0 commit comments