diff --git a/src/Illuminate/Foundation/Auth/Access/Authorizable.php b/src/Illuminate/Foundation/Auth/Access/Authorizable.php index dd0ba609fbab..d8cf50dbc537 100644 --- a/src/Illuminate/Foundation/Auth/Access/Authorizable.php +++ b/src/Illuminate/Foundation/Auth/Access/Authorizable.php @@ -18,6 +18,18 @@ public function can($abilities, $arguments = []) return app(Gate::class)->forUser($this)->check($abilities, $arguments); } + /** + * Determine if the entity has any of the given abilities. + * + * @param iterable|string $abilities + * @param array|mixed $arguments + * @return bool + */ + public function canAny($abilities, $arguments = []) + { + return app(Gate::class)->forUser($this)->any($abilities, $arguments); + } + /** * Determine if the entity does not have the given abilities. *