Registry / auth / zizaco-entrust

zizaco-entrust

JSON →
library1.9.1phppackagistunverified

Flexible way to add Role-based Permissions to Laravel. Supports Laravel 5|6|7|8.

composer require zizaco/entrust
INSTALL
IMPORT
SIG · ZIZACO-ENTRUST
Z
zizaco-entrust
authphpv1.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EntrustServiceProvider
use Zizaco\Entrust\EntrustServiceProvider;

Register service provider and check role.

<?php // Add to config/app.php providers array: Zizaco\Entrust\EntrustServiceProvider::class, // Then use the Entrust facade use Zizaco\Entrust\EntrustFacade; if (EntrustFacade::hasRole('admin')) { // admin logic }
Debug
Known issues
breakingDeprecated for Laravel 9+; use spatie/laravel-permission instead.
fix
Migrate to spatie/laravel-permission for newer Laravel versions.
affects: >=1.9.0
Upgrade
Version history
1.9.1latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
32
Resources
zizaco-entrust — pip install zizaco-entrust · libregistry