Skip to content

osenco/laravel-role-permission-policies

 
 

Repository files navigation

Logo for laravel-permission

Associate users with permissions, roles and policies

Documentation, Installation, and Usage Instructions

See the documentation for detailed installation and usage instructions.

What It Does

This package allows you to manage user permissions and roles in a database.

Once installed you can do stuff like this:

// Adding permissions to a user
$user->givePermissionTo('edit articles');

// Adding permissions via a role
$user->assignRole('writer');

$role->givePermissionTo('edit articles');

Because all permissions will be registered on Laravel's gate, you can check if a user has a permission with Laravel's default can function:

$user->can('edit articles');

Filament

Please see FILAMENT for how to setup on Filament.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Testing

composer test

Security

If you discover any security-related issues, please email security@osen.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Associate Laravel users with global or team roles and permissions, and generate policies. Filament support built in

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.6%
  • Blade 0.4%