rdx / laravel-authgate-policies
Takes abilities from a list of policy classes.
Package info
github.com/rudiedirkx/laravel-authgate-policies
pkg:composer/rdx/laravel-authgate-policies
1.0
2023-01-21 02:08 UTC
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2026-02-21 09:01:44 UTC
README
- Install with composer.
- Define which policies to load in your
AuthServiceProvider(see below).
Abilities' names will follow method names:
function manageAllUsers()becomes abilitymanage-all-usersfunction see360DegreeFeedback()becomes abilitysee360-degrees-feedbackfunction see_360DegreeFeedback()becomes abilitysee-360-degrees-feedback
Replace your AuthServiceProvider with this:
use App\Policies;
use rdx\authgate\PoliciesServiceProvider;
class AuthServiceProvider extends PoliciesServiceProvider {
protected $policies = [
Policies\UserPolicy::class,
Policies\FilePolicy::class,
// All your policy classes
];
}
If you want to add more register() or boot() code, be sure to call parent::register() or parent::boot()!
See PoliciesServiceProvider for more options.