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
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

gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
doctrine/dbal

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

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440