marko/pagination

Pagination interfaces and implementations for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-pagination

Type:marko-module

pkg:composer/marko/pagination

Statistics

Installs: 4

Dependents: 1

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:20 UTC


README

Offset and cursor pagination with API-ready serialization--paginate any result set without coupling to your data layer.

Installation

composer require marko/pagination

Quick Example

use Marko\Pagination\OffsetPaginator;

$paginator = new OffsetPaginator(
    items: $items,
    total: 150,
    perPage: 15,
    currentPage: 3,
);

$paginator->hasMorePages(); // true
$paginator->lastPage();     // 10
$paginator->toArray();      // ['items' => [...], 'meta' => [...], 'links' => [...]]

Documentation

Full usage, API reference, and examples: marko/pagination