New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

genealabs/laravel-authorization-addons

Additional helper methods and blade directives to help with more complex authorization queries.
689 6
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
Maintainer: mikebronner

Authorization Addons for Laravel

Authorization Addons for Laravel masthead image.

Join the chat at https://gitter.im/GeneaLabs/laravel-authorization-addons Travis SensioLabs Insight Scrutinizer Coveralls GitHub (pre-)release Packagist GitHub license

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

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

407,699,310 4,663

Version History

Version Released PHP Laravel License
13.0.0 ^8.2 ^11.0|^12.0|^13.0 MIT
1.0.1 >=7.2 ^5.5|^6.0 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