Skip to content
Additional helper methods and blade directives to help with more complex authorization queries.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
tests
.gitignore
.scrutinizer.yml
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
README.md
composer.json
phpunit.xml

README.md

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
You can’t perform that action at this time.