Hello there. I'm facing with issue - im showing my groups name with keyboard buttons, and after clicking to any of them it will lead to other action with additional functionalties. But now even if im applying some filtering still im getting around 30 buttons. so is there any methods to paginate that result?
here's my part of the handler:
public function groups()
{
$this->chatLoadingAction();
$name = env('APP_NAME');
$groupsCount = Group::all()->count();
$allGroups = [];
$groupsCollection = Group::all();
foreach ($groupsCollection as $group) {
$allGroups[] = Button::make($group->title)->action('group')->param('id', $group->id);
}
$this->chat->message("Groups of <b>$name</b> - total $groupsCount groups:\n\n")
->keyboard(Keyboard::make()->buttons($allGroups)->chunk(2))->send();
}
Hello there. I'm facing with issue - im showing my groups name with keyboard buttons, and after clicking to any of them it will lead to other action with additional functionalties. But now even if im applying some filtering still im getting around 30 buttons. so is there any methods to paginate that result?
here's my part of the handler: