genealabs/laravel-authorization-addons
| Install | |
|---|---|
composer require genealabs/laravel-authorization-addons |
|
| Latest Version: | 13.0.0 |
| PHP: | ^8.2 |
| Laravel: | 11 · 12 · 13 |
| Older releases: | 5 · 6 |
| License: | MIT |
| Last Updated: | Mar 30, 2026 |
| Links: | GitHub · Packagist |
Authorization Addons for Laravel
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
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 13.0.0 | ^8.2 | ^11.0| | MIT | |
| 1.0.1 | >=7.2 | ^5.5| | MIT | |
| 1.0.0 | >=7.2 | 5.5 - 6.0 | MIT | |
| 0.2.0 | >=7.1.3 | 5.5 - 5.8 | MIT | |
| 0.1.4 | >=7.0.0 | 5.5 - 5.7 | MIT | |
| 0.1.3 | >=7.0.0 | 5.5 - 5.6 | MIT | |
| 0.1.2 | >=7.0.0 | 5.5.* | MIT | |
| 0.1.1 | >=7.0.0 | 5.5.* | MIT | |
| 0.1.0 | >=7.0.0 | 5.5.* | MIT |