Takes abilities from a list of policy classes.
rdx/laravel-authgate-policies is a Laravel package for takes abilities from a list of policy classes..
It currently has 0 GitHub stars and 8.283 downloads on Packagist (latest version 1.0).
Install it with composer require rdx/laravel-authgate-policies.
Discover more Laravel packages by rdx
or browse all Laravel packages to compare alternatives.
Last updated
AuthServiceProvider (see below).Abilities' names will follow method names:
function manageAllUsers() becomes ability manage-all-usersfunction see360DegreeFeedback() becomes ability see360-degrees-feedbackfunction see_360DegreeFeedback() becomes ability see-360-degrees-feedbackReplace 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.