PHPackages                             lartie/telegram-bot-pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lartie/telegram-bot-pagination

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lartie/telegram-bot-pagination
==============================

Telegram Bot Pagination

v1.0.0(9y ago)1127214MITPHPPHP &gt;=7.0CI failing

Since Nov 22Pushed 5y ago2 watchersCompare

[ Source](https://github.com/lartie/Telegram-Bot-Pagination)[ Packagist](https://packagist.org/packages/lartie/telegram-bot-pagination)[ Docs](https://github.com/lartie/telegram-bot-pagination)[ RSS](/packages/lartie-telegram-bot-pagination/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Telegram Bot Pagination
=======================

[](#telegram-bot-pagination)

[![Latest Stable Version](https://camo.githubusercontent.com/579438569bf48ec24a45142dd16115fbdaacdb0ecd243fc9566acbb7bc2c79d5/68747470733a2f2f706f7365722e707567782e6f72672f6c61727469652f74656c656772616d2d626f742d706167696e6174696f6e2f762f737461626c65)](https://packagist.org/packages/lartie/telegram-bot-pagination)[![Total Downloads](https://camo.githubusercontent.com/09017fd9b65082573e62eeb502cff63dff6b5944bec2721f3cf110a6ebc2e454/68747470733a2f2f706f7365722e707567782e6f72672f6c61727469652f74656c656772616d2d626f742d706167696e6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/lartie/telegram-bot-pagination)[![Latest Unstable Version](https://camo.githubusercontent.com/36ccfcc33ee66110c78c0442cd2f0d41ac3035cf8040a32cefbb842292f39be0/68747470733a2f2f706f7365722e707567782e6f72672f6c61727469652f74656c656772616d2d626f742d706167696e6174696f6e2f762f756e737461626c65)](https://packagist.org/packages/lartie/telegram-bot-pagination)[![License](https://camo.githubusercontent.com/b20fe2d7bca56024acfe86a8f282186adc15b3cdaa9c075b7107714650345f74/68747470733a2f2f706f7365722e707567782e6f72672f6c61727469652f74656c656772616d2d626f742d706167696e6174696f6e2f6c6963656e7365)](https://packagist.org/packages/lartie/telegram-bot-pagination)[![composer.lock](https://camo.githubusercontent.com/bb26a1ee86d18c73e9575452e132799343c70c38eeabf0cd3d1013ec974ad522/68747470733a2f2f706f7365722e707567782e6f72672f6c61727469652f74656c656772616d2d626f742d706167696e6174696f6e2f636f6d706f7365726c6f636b)](https://packagist.org/packages/lartie/telegram-bot-pagination)

- [Installation](#installation)
    - [Composer](#composer)
- [Usage](#usage)
    - [Test Data](#test-data)
    - [How To Use](#how-to-use)
    - [Result](#result)
- [License](#license)

Installation
------------

[](#installation)

### Composer

[](#composer)

```
composer require "lartie/telegram-bot-pagination:^1.0.0"
```

Usage
-----

[](#usage)

### Test Data

[](#test-data)

```
$items = range(1, 100);
$command = 'testCommand'; // optional. Default: pagination
$selectedPage = 10; // optional. Default: 1
```

### How To Use

[](#how-to-use)

```
$cqPagination = new CallbackQueryPagination($items, $command);
$cqPagination->setMaxButtons(6);
$cqPagination->setWrapSelectedButton('< #VALUE# >');

$pagination = $cqPagination->pagination($selectedPage); //$cqPagination->setSelectedPage($selectedPage);
```

### Result

[](#result)

```
if (!empty($paginate['keyboard'])) {
    $paginate['keyboard'][0]['callback_data']; // testCommand?currentPage10=&nextPage=1
    $paginate['keyboard'][1]['callback_data']; // testCommand?currentPage10=&nextPage=9
    ...

    $response = [
        'reply_markup' => json_encode([
            'inline_keyboard' => [
                $paginate['keyboard'],
            ],
        ]),
    ];
}
```

Code Quality
------------

[](#code-quality)

Run the PHPUnit tests with PHPUnit.

```
phpunit tests/

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3458d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f17981d530cb7f467746bdfa9a16d82fd40cdbd0cac296736a6b130a2866a87?d=identicon)[lartie](/maintainers/lartie)

---

Tags

composerlaravelpaginationtelegramtelegram-botlaravelpaginationtelegramtelegram bottelegram apitelegram-callback

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lartie-telegram-bot-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/lartie-telegram-bot-pagination/health.svg)](https://phpackages.com/packages/lartie-telegram-bot-pagination)
```

###  Alternatives

[log1x/pagi

A better WordPress pagination.

59105.4k](/packages/log1x-pagi)[singlequote/laravel-datatables

This repo contains a Datatable that can render a filterable and sortable table. It aims to be very lightweight and easy to use. It has support for retrieving data asynchronously, pagination and recursive searching in relations

1924.2k](/packages/singlequote-laravel-datatables)[williamson/laragram

A Laravel Wrapper for telegram-cli

282.8k](/packages/williamson-laragram)[mtrdesign/krait

Krait provides an easy way to create Ajax Datatables.

101.9k](/packages/mtrdesign-krait)[vitorf7/lv-loadmorepagination

Load More Pagination for Laravel. Allows to load an initial number of items and subsequent pages can load a different number of items

111.2k](/packages/vitorf7-lv-loadmorepagination)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
