| Package Data | |
|---|---|
| Maintainer Username: | kaizer666 |
| Maintainer Contact: | kaizer@kai-zer.ru (Kovalyov Maksim) |
| Package Create Date: | 2017-08-24 |
| Package Last Update: | 2017-09-29 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-19 15:02:55 |
| Package Statistics | |
|---|---|
| Total Downloads: | 23,800 |
| Monthly Downloads: | 2 |
| Daily Downloads: | 0 |
| Total Stars: | 6 |
| Total Watchers: | 1 |
| Total Forks: | 2 |
| Total Open Issues: | 1 |
Russian ReadMe here
Paginator for questions, with Union
composer require kaizer666/laravel-union-paginator
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
);
}
$ composer test
The MIT License (MIT)