User administration backend for Laravel Enso

Maintainers

Package info

github.com/laravel-enso/users

pkg:composer/laravel-enso/users

Statistics

Installs: 24 595

Dependents: 21

Suggesters: 0

Stars: 1

Open Issues: 1


README

License Stable Downloads PHP Issues Merge Requests

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 User model 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}/edit
  • PATCH {user}
  • DELETE {user}
  • GET initTable
  • GET tableData
  • GET exportExcel
  • GET options
  • GET {user}
  • POST {user}/resetPassword

Token endpoints:

  • administration.token.create
  • administration.token.store
  • administration.token.index
  • administration.token.destroy

Session endpoints:

  • administration.session.index
  • administration.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:

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!