Download the PHP package statix/sentra without Composer
On this page you can find all versions of the php package statix/sentra. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download statix/sentra
More information about statix/sentra
Files in statix/sentra
Package sentra
Short Description A lightweight Laravel roles and permissions package using Backed Enums.
License MIT
Homepage https://github.com/statix-php/sentra
Informations about the package sentra
Sentra for Laravel
A lightweight Laravel roles and permissions package using Backed Enums.
Installation
You can install the package via composer:
You should publish the config file with the following command:
This is the contents of the published config file:
Usage
To get started, create two string backed Enums - one of your roles and one for your permissions.
If you create your enums in a different namespace or different name, be sure to update the roles_enum
and permissions_enum
in the sentra.php
config file.
Then add the AsRole
trait to your Roles
enum.
And add the AsPermission
trait to your Permissions
enum.
You are now ready to start defining your roles and permissions.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Wyatt Castaneda
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Todo
- make it easier to assign a super-admin role, kinda of like the before method in laravel policies
All versions of sentra with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0