telegram-bot-essentials / user-management
Admin bot-user list with filters, sections and interaction logging for telegram-bot-essentials/essence
Package info
github.com/Telegram-Bot-Essentials/user-management
pkg:composer/telegram-bot-essentials/user-management
Requires
- php: ^8.3
- laravel/framework: ^12 || ^13
- telegram-bot-essentials/essence: ^0.12
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^10.0 || ^11.0
- pestphp/pest: ^3.7 || ^4.0
- pestphp/pest-plugin-laravel: ^3.1 || ^4.0
README
Gives admins a browsable, sortable, filterable list of bot users, a per-user detail screen
built from pluggable sections, and automatic interaction logging — on top of
telegram-bot-essentials/essence.
Other packages (notably
user-wallet) extend the list by
registering their own sort, filter, section, or header block rather than forking the admin
UI.
Installation
composer require telegram-bot-essentials/user-management
php artisan migrate
# optional — change the default sort/filter
php artisan vendor:publish --tag=tbe-user-management-config
Install it, and admins get a working "Users" menu immediately.
Extension points
| Helper | Registers | Purpose |
|---|---|---|
botUserSorts() |
BotUserSort |
A sortable/displayable column in the list |
botUserFilters() |
BotUserFilter |
A single-select list filter (reachability filters ship built-in) |
userManagementStats() |
UserStat |
A block in the list header |
userManagementSections() |
UserSection |
A button or inline block on the per-user detail screen |
botUserSorts()->addSort(new BotUserSort( key: 'wallet_balance', label: __('my-package::bot_users.sorts.wallet_balance'), apply: fn ($query, $direction) => $query->leftJoin(/* ... */)->orderBy(/* ... */)->select('bot_users.*'), display: fn (BotUser $user) => $user->wallet_balance ?? '0', active: fn () => settings()->get('billing.user_wallet.status'), ));
activemust be aClosurefor anything conditional on a per-bot setting — it's evaluated per request, afterwHook()->bot()resolves, not once at boot.
Every update a user generates is logged to bot_user_actions automatically once the
package is installed; reachability transitions are logged separately off essence's
BotUserStatusChanged event.
Documentation
Full documentation — every DTO, the filtering and stats APIs, interaction logging, and how User Wallet plugs in — lives on the Telegram Bot Essentials documentation site under Modules → User Management.
License
MIT.