Users
Description
Users is Enso's backend package for application account administration.
It manages the user entity itself, profile and access relationships, API tokens, active sessions, password resets, select options, and table/export endpoints, while integrating with people, roles, user groups, files, companies, and core preferences.
Installation
Install the package:
composer require laravel-enso/users
Run the migrations:
php artisan migrate
Features
- Full user CRUD with create, edit, show, reset password, and destroy flows.
- Session inspection and forced session termination endpoints.
- API token create/store/index/destroy endpoints.
- Table bootstrap, data, and export endpoints.
- Rich
Usermodel with role/group checks, preferences, and login relations. - Sanctum integration through
HasApiTokens.
Usage
Main user routes:
- prefix:
api/administration/users - name prefix:
administration.users.
User endpoints:
GET create/{person}POST /GET {user}/editPATCH {user}DELETE {user}GET initTableGET tableDataGET exportExcelGET optionsGET {user}POST {user}/resetPassword
Token endpoints:
administration.token.createadministration.token.storeadministration.token.indexadministration.token.destroy
Session endpoints:
administration.session.indexadministration.session.destroy
Main model:
LaravelEnso\Users\Models\User
Notable methods:
canAccess(string $route)isAdmin()isSupervisor()isSuperior()belongsToAdminGroup()preferredLocale()initPreferences()
API
This package exposes its backend integration through the routes, controllers, services, jobs, and configuration points referenced in the usage examples above.
Consumers should rely on the published config keys, documented route groups, and explicit service classes shown in the examples. Internal helper classes, listeners, casts, and background jobs are implementation details unless the README calls them out as extension points.
Depends On
Required Enso packages:
laravel-enso/avatars↗laravel-enso/companies↗laravel-enso/core↗laravel-enso/dynamic-methods↗laravel-enso/files↗laravel-enso/forms↗laravel-enso/helpers↗laravel-enso/people↗laravel-enso/rememberable↗laravel-enso/roles↗laravel-enso/select↗laravel-enso/tables↗laravel-enso/user-groups↗
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!