PHPackages                             kaizer666/laravel-union-paginator - 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. [Database &amp; ORM](/categories/database)
4. /
5. kaizer666/laravel-union-paginator

ActiveLibrary[Database &amp; ORM](/categories/database)

kaizer666/laravel-union-paginator
=================================

Paginate queries with union in laravel

0.3.7(8y ago)623.9k2[1 issues](https://github.com/kaizer666/LaravelUnionPaginator/issues)MITPHPPHP &gt;=5.6

Since Aug 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kaizer666/LaravelUnionPaginator)[ Packagist](https://packagist.org/packages/kaizer666/laravel-union-paginator)[ RSS](/packages/kaizer666-laravel-union-paginator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

Laravel Union Paginator
=======================

[](#laravel-union-paginator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/88e4c72bc265e3b6114cb2225c4a702f37a82dda41c012f41ada7121c4b4dd45/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61697a65723636362f6c61726176656c2d756e696f6e2d706167696e61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaizer666/laravel-union-paginator)[![Licence](https://camo.githubusercontent.com/8cb36b60486b15872e8f8786c56fededb8bcfad9e8604dcc3b7f2251fa7a891c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b61697a65723636362f6c61726176656c2d756e696f6e2d706167696e61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kaizer666/laravel-union-paginator)[![Build Status](https://camo.githubusercontent.com/2439266c8514553ab5a667d0d616a25bc3db0b7898ca6a0c1eed655a2b4a71f1/68747470733a2f2f7472617669732d63692e6f72672f6b61697a65723636362f4c61726176656c556e696f6e506167696e61746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kaizer666/LaravelUnionPaginator)[![Total Downloads](https://camo.githubusercontent.com/c0f37558fea80252f0cbc00a6cde268d7a51ed8174d6a06b63a0e3e346d69423/68747470733a2f2f706f7365722e707567782e6f72672f6b61697a65723636362f6c61726176656c2d756e696f6e2d706167696e61746f722f642f746f74616c)](https://packagist.org/packages/kaizer666/laravel-union-paginator)[![Latest Stable Version](https://camo.githubusercontent.com/4a8a991e29890fa2aa958d683a702bb037719cf9fd00c235cbfa2e128eabe790/68747470733a2f2f706f7365722e707567782e6f72672f6b61697a65723636362f6c61726176656c2d756e696f6e2d706167696e61746f722f76657273696f6e)](https://packagist.org/packages/barryvdh/laravel-debugbar)

Russian ReadMe
--------------

[](#russian-readme)

Russian ReadMe [here](README_ru.md)

About
-----

[](#about)

Paginator for questions, with Union

Install
-------

[](#install)

```
composer require kaizer666/laravel-union-paginator

```

Usage
-----

[](#usage)

```
use Union\UnionPaginator;

function test() {
    $data = Model::select(["id", "firstname"])
      ->whereIn("id", [1,2,3]);
    $data2 = OtherModel::select(["id", "firstname"])
      ->whereIn("id", [4,5,6])
      ->union($data);
    $paginator = new UnionPaginator();
    $response = $paginator
      ->setQuery($data2)
      ->setCurrentPage(28)
      ->setPerPage(20)
      ->getPaginate();
    $response["pagination"] = $paginator->links(); // html paginator
    $response["pagination_json"] = $paginator->linksJson(); // Json paginator
    return response()->json(
      $response
    );
}

```

Testing
-------

[](#testing)

```
$ composer test
```

Credits
-------

[](#credits)

- [Maksim kovalyov](https://github.com/kaizer666)

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~3 days

Recently: every ~9 days

Total

12

Last Release

3154d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/341d7652e71a9ade930161d5d01fe44f97c6a51dfd1e437acb88d41b088bc944?d=identicon)[kaizer666](/maintainers/kaizer666)

---

Top Contributors

[![kai-zer-ru](https://avatars.githubusercontent.com/u/4065357?v=4)](https://github.com/kai-zer-ru "kai-zer-ru (13 commits)")[![kaizer666](https://avatars.githubusercontent.com/u/260150742?v=4)](https://github.com/kaizer666 "kaizer666 (10 commits)")[![chris88-lang](https://avatars.githubusercontent.com/u/242705891?v=4)](https://github.com/chris88-lang "chris88-lang (4 commits)")

---

Tags

laravellaravel-union-paginatorpaginationphpunion

### Embed Badge

![Health badge](/badges/kaizer666-laravel-union-paginator/health.svg)

```
[![Health](https://phpackages.com/badges/kaizer666-laravel-union-paginator/health.svg)](https://phpackages.com/packages/kaizer666-laravel-union-paginator)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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