PHPackages                             larawelp/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. [Framework](/categories/framework)
4. /
5. larawelp/pagination

ActiveLibrary[Framework](/categories/framework)

larawelp/pagination
===================

A simple library for generating pagination for LaraWelP

v0.0.10(2y ago)1271MITPHPPHP ^8.0

Since Aug 20Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (11)Used By (1)

This is a simple PHP library for creating pagination.

Basic Usage
===========

[](#basic-usage)

Here is an example for creating the pagination in WordPress.

```
global $wp_query;

// The total number of items
$total       = (int)$wp_query->found_posts;

// The number of items are going to be displayed per page.
$perPage     = (int)$wp_query->query_vars['posts_per_page'];

// The current page number.
$currentPage = (int)$wp_query->query_vars['paged'];

// additional options
$options     = ['urlStyle' => 'pretty'];

$paginator   = new Paginator($total, $perPage, $currentPage, $options);

echo $paginator->toHtml();
```

Customize the markup
--------------------

[](#customize-the-markup)

If you don't like the default markup, you can specify your own view file to output the markup.

```
$paginator = new Paginator($total, $perPage, $currentPage, ['view'=> '/www/var/example.com/pagination.php']);
```

You can also specify the view with using the dot notation, for example `['view'=> 'components.pagination']`; by using the dot notation it will try to use the [Blade Templates](https://laravel.com/docs/master/blade) if possible.

Take a look at the [preset views](https://github.com/larawelp/pagination/tree/master/resources/views) for more details.

Options
=======

[](#options)

onEachSide
----------

[](#oneachside)

TypeDefaultint3The number of links on each side of the center link.

type
----

[](#type)

TypeDefaultstring'default'The rendering type.

- `default`
- `menu`
- `simple`

view
----

[](#view)

TypeDefaultstringnullThe path of view file.

Could be either a blade template or a regular php file.
If you wish to use a php file, you should add the `.php` at the end of the string.

urlStyle
--------

[](#urlstyle)

TypeDefaultstring'pretty'The link style.

- `pretty`: example.com/news/page/10
- `queryString`: example.com/news/?page=10

nextPageText
------------

[](#nextpagetext)

TypeDefaultstring'»'The next page link text.

prevPageText
------------

[](#prevpagetext)

TypeDefaultstring'«'The previous page link text.

path
----

[](#path)

TypeDefaultstringnullThe user-defined base path.

suffix
------

[](#suffix)

TypeDefaultstring''The suffix to be added to the very end of the url. Such as fragment or query-strings.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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

Every ~0 days

Total

11

Last Release

993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2daa3e2934d64489e7430ec204b6822ccc9e4f97adf4d3f059bc0993a645d6c?d=identicon)[filipac](/maintainers/filipac)

---

Top Contributors

[![filipac](https://avatars.githubusercontent.com/u/271155?v=4)](https://github.com/filipac "filipac (2 commits)")

---

Tags

frameworklaravelwordpresslarawelp

### Embed Badge

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

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

###  Alternatives

[wpbones/wpbones

WordPress framework for Laravel developers

1714.8k1](/packages/wpbones-wpbones)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1810.1k4](/packages/wpstarter-framework)

PHPackages © 2026

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