laravel-enso / roles
Role management for Laravel Enso
Requires
- laravel-enso/core: ^12.0
- laravel-enso/enums: ^3.0
- laravel-enso/forms: ^5.0
- laravel-enso/helpers: ^4.0
- laravel-enso/menus: ^5.0
- laravel-enso/migrator: ^2.0
- laravel-enso/permissions: ^5.0
- laravel-enso/rememberable: ^4.0
- laravel-enso/select: ^5.0
- laravel-enso/tables: ^5.0
- laravel-enso/user-groups: ^2.5
- laravel-enso/users: ^2.8
- dev-master
- 5.6.5
- 5.6.4
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6.0
- 5.5.0
- 5.4.0
- 5.3.0
- 5.2.0
- 5.1.8
- 5.1.7
- 5.1.6
- 5.1.5
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.1
- 5.0.0
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.6
- 4.1.5
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.2
- 4.0.1
- 4.0.0
- 3.4.11
- 3.4.10
- 3.4.9
- 3.4.8
- 3.4.7
- 3.4.6
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.4
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.7
- 3.1.6
- 3.1.5
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.5.14
- 2.5.13
- 2.5.12
- 2.5.11
- 2.5.10
- 2.5.9
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.62
- 2.3.61
- 2.3.60
- 2.3.59
- 2.3.58
- 2.3.57
- 2.3.56
- 2.3.55
- 2.3.54
- 2.3.53
- 2.3.52
- 2.3.51
- 2.3.50
- 2.3.49
- 2.3.48
- 2.3.47
- 2.3.46
- 2.3.45
- 2.3.44
- 2.3.43
- 2.3.42
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.40
- 2.2.39
- 2.2.38
- 2.2.37
- 2.2.36
- 2.2.35
- 2.2.34
- 2.2.33
- 2.2.32
- 2.2.31
- 2.2.30
- 2.2.29
- 2.2.28
- 2.2.27
- 2.2.26
- 2.2.25
- 2.2.24
- 2.2.23
- 2.2.22
- 2.2.21
- 2.2.20
- 2.2.19
- 2.2.18
- 2.2.17
- 2.2.16
- 2.2.15
- 2.2.14
- 2.2.13
- 2.2.12
- 2.2.11
- 2.2.10
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.12
- 2.1.11
- 2.1.10
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- dev-upgrade/laravel13-core12
- dev-feature/ensoV8
- dev-upgrades/enums
- dev-upgrade/enso6-dr
- dev-upgrade/enso6
- dev-feature/dropSuffix
- dev-hotfix/sync-order
- dev-feature/addsCache
- dev-upgrade/laravel8
- dev-bugfix/rolesWithoutDefaultMenu
This package is auto-updated.
Last update: 2026-04-22 07:07:55 UTC
README
Description
Roles manages role records and role-to-permission assignment in Laravel Enso.
The package exposes CRUD and table APIs for roles, companion endpoints for reading and writing role permissions, and a sync command used to propagate role configuration between environments.
It is intended for Enso applications that use permission-based route access and need roles managed from the backoffice instead of hard-coded seeds alone.
Installation
Install the package:
composer require laravel-enso/roles
Run the package migrations:
php artisan migrate
Optional publishes:
php artisan vendor:publish --tag=roles-config php artisan vendor:publish --tag=roles-factory php artisan vendor:publish --tag=roles-seeder
Features
- Role CRUD, options, table init, table data, and Excel export endpoints.
- Permission assignment endpoints for reading, setting, and writing role permissions.
- Config publishing for role restrictions and group visibility.
enso:roles:synccommand for syncing local role definitions fromconfig/local/roles.
Usage
Main route groups:
system.roles.*system.roles.permissions.*
Permission assignment flow:
- read current role permissions through
permissions.get - submit updates through
permissions.set - persist config files through
permissions.write
Environment sync:
php artisan enso:roles:sync
The command only runs when the local config/local/roles directory exists.
API
HTTP routes
GET api/system/roles/createPOST api/system/rolesGET api/system/roles/{role}/editPATCH api/system/roles/{role}DELETE api/system/roles/{role}GET api/system/roles/initTableGET api/system/roles/tableDataGET api/system/roles/exportExcelGET api/system/roles/optionsGET api/system/roles/permissions/get/{role}POST api/system/roles/permissions/set/{role}POST api/system/roles/permissions/write/{role}
Artisan commands
enso:roles:sync
Depends On
Required Enso packages:
laravel-enso/core↗laravel-enso/enums↗laravel-enso/forms↗laravel-enso/helpers↗laravel-enso/menus↗laravel-enso/migrator↗laravel-enso/permissions↗laravel-enso/rememberable↗laravel-enso/select↗laravel-enso/tables↗laravel-enso/user-groups↗laravel-enso/users↗
Companion frontend package:
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!