genealabs / laravel-authorization-addons
Additional helper methods and blade directives to help with more complex authorization queries.
Package info
github.com/mikebronner/laravel-authorization-addons
pkg:composer/genealabs/laravel-authorization-addons
Fund package maintenance!
Requires
- php: ^8.2
- illuminate/auth: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.8|^4.0
- pestphp/pest-plugin-laravel: ^3.2|^4.0
- phpunit/phpunit: ^10.5|^11.0|^12.0
- spatie/invade: ^2.1
This package is auto-updated.
Last update: 2026-03-30 23:38:06 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