PHPackages                             makscraft/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. [Templating &amp; Views](/categories/templating)
4. /
5. makscraft/pagination

ActiveLibrary[Templating &amp; Views](/categories/templating)

makscraft/pagination
====================

Pagination manager for Symfony applications.

1.0.0(1y ago)013MITPHPPHP &gt;=7.0

Since Jul 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/makscraft/pagination)[ Packagist](https://packagist.org/packages/makscraft/pagination)[ RSS](/packages/makscraft-pagination/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Pagination
==========

[](#pagination)

Pagination manager for Symfony applications.

Generates list of links and parameters for SQL queries.

[![pagination](https://private-user-images.githubusercontent.com/8859590/353471421-620c1f38-3b7d-4764-b186-38c5e2031e7c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUyMDAzOTQsIm5iZiI6MTc3NTIwMDA5NCwicGF0aCI6Ii84ODU5NTkwLzM1MzQ3MTQyMS02MjBjMWYzOC0zYjdkLTQ3NjQtYjE4Ni0zOGM1ZTIwMzFlN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDNUMDcwODE0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWYyZjJkMGYwZjk5ZTI4ZDk5ZTBlZTYwY2Q4Mjk0YTZmMGQ0NjRiOTRkZjBiMjU0MGJkMDRjYzdjOWQ4ZGRjMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VB3dW18yg30r3HYFaLi6nI6NiBd01kjDOZcXDHb-teo)](https://private-user-images.githubusercontent.com/8859590/353471421-620c1f38-3b7d-4764-b186-38c5e2031e7c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUyMDAzOTQsIm5iZiI6MTc3NTIwMDA5NCwicGF0aCI6Ii84ODU5NTkwLzM1MzQ3MTQyMS02MjBjMWYzOC0zYjdkLTQ3NjQtYjE4Ni0zOGM1ZTIwMzFlN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDNUMDcwODE0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YWYyZjJkMGYwZjk5ZTI4ZDk5ZTBlZTYwY2Q4Mjk0YTZmMGQ0NjRiOTRkZjBiMjU0MGJkMDRjYzdjOWQ4ZGRjMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.VB3dW18yg30r3HYFaLi6nI6NiBd01kjDOZcXDHb-teo)

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

[](#installation)

```
composer require makscraft/pagination

```

Example of use in controller or repository
------------------------------------------

[](#example-of-use-in-controller-or-repository)

```
use Makscraft\Pagination;

$total = ... ; //count your all needed items
$limit = 20; //items per page

$pagination = new Pagination($total, $limit);
$repository -> findBy([...], [...], $pagination -> getLimit(), $pagination -> getOffset());

//Returns array of links for html template.
$data = $pagination -> setPath('/catalog') -> getDisplayData();

```

Result links in $data will look like: '/catalog?page=3'.

You can pass the path with additional GET parameters if you want.

```
$pagination -> setPath('/catalog?sort=name&direction=asc');

```

For twig templates
------------------

[](#for-twig-templates)

Use package twig template or copy it into templates directory of your project. Inside the controller pass the pagination object into template.

```
return $this -> render('mypage.html.twig', [

    ...

    'pagination' => $pagination
]);

```

To use template from vendor directory add the path into twig config file.

```
# config/packages/twig.yaml
paths:
    'vendor/makscraft/pagination/templates': 'pagination'

```

Next include the pagination template into your twig files.

```
{% include '@pagination/pagination.html.twig' %}

```

Also you can copy the template file into your templates directory and use it as you like.

Template file location: **vendor/makscraft/pagination/templates/pagination.html.twig**

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

656d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c2b1f6979fd3b1650a6b42e5d1e9072378fc2f9f17bd4e5e0cac9b228f66c89?d=identicon)[mszaykov](/maintainers/mszaykov)

---

Top Contributors

[![makscraft](https://avatars.githubusercontent.com/u/8859590?v=4)](https://github.com/makscraft "makscraft (25 commits)")

---

Tags

phpsymfonytwig

### Embed Badge

![Health badge](/badges/makscraft-pagination/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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