PHP code example of telegram-bot-essentials / user-management
1. Go to this page and download the library: Download telegram-bot-essentials/user-management library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
telegram-bot-essentials / user-management example snippets
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'),
));