genealabs / laravel-authorization-addons
Additional helper methods and blade directives to help with more complex authorization queries.
Fund package maintenance!
mikebronner
Installs: 689
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 1
pkg:composer/genealabs/laravel-authorization-addons
Requires
- php: >=7.2
- illuminate/auth: ^5.5|^6.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-29 01:44:04 UTC
README
Additional helper methods and blade directives to help with more complex authorization queries.
Usage
@canAny (iterable $abilities, $model)
Checks if any one of the abilities is authorized for the given model.
@canAny (['create', 'edit'], $post)
@canEvery (iterable $abilities, string $model)
Checks if all of the abilities are authorized for the given model.
@canEvery (['create', 'edit', 'remove'], $post)
@elseCanAny (iterable $abilities, string $model)
Same as @canAny
, but allowing for multiple conditionals when checking
authorizations.
@elseCanEvery (iterable $abilities, string $model)
Same as @canEvery
, but allowing for multiple conditionals when checking
authorizations.
Inverse Methods:
The following inverse methods are also available, along with the same signatures as their counterparts:
@cannotAny
@cannotEvery
@elseCannotAny
@elseCannotEvery