PHPackages                             roquie/laravel-perpage-resolver - 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. roquie/laravel-perpage-resolver

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

roquie/laravel-perpage-resolver
===============================

Add a few feature to resolve per\_page query parameter globally.

2.0.0(5y ago)52.9k2MITPHPPHP &gt;=8.0CI failing

Since Feb 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/roquie/laravel-perpage-resolver)[ Packagist](https://packagist.org/packages/roquie/laravel-perpage-resolver)[ RSS](/packages/roquie-laravel-perpage-resolver/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (7)Versions (10)Used By (0)

Laravel PerPage Resolver
========================

[](#laravel-perpage-resolver)

[![Build Status](https://camo.githubusercontent.com/4464798e11e945dec4b8f030868625394ba271ea7dcbc9e24009f43a8840c001/68747470733a2f2f7472617669732d63692e6f72672f726f717569652f6c61726176656c2d706572706167652d7265736f6c7665722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/roquie/laravel-perpage-resolver)[![Coverage Status](https://camo.githubusercontent.com/bff0ce185fe96f0f70adff03e523bf02a50aaef59577fd4e2e5208864cd4e742/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f726f717569652f6c61726176656c2d706572706167652d7265736f6c7665722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/roquie/laravel-perpage-resolver?branch=master)

This package add the same method `perPageResolver` like as `currentPageResolver`. Now, `?per_page=100` parameter have a globally access for all models (like `?page=2`).

How to use
----------

[](#how-to-use)

For the beginning, install composer package:

```
composer require roquie/laravel-perpage-resolver

```

Second, apply a service provider it's here (if you use Laravel 5.5+ [it's no need anymore](https://laravel-news.com/package-auto-discovery)):

```
// config/app.php, the providers array
// ...
Roquie\LaravelPerPageResolver\PerPageResolverServiceProvider::class,
```

Third, you can use `PerPageResolverTrait` in your models (recommended):

```
use Illuminate\Database\Eloquent\Model;
use Roquie\LaravelPerPageResolver\PerPageResolverTrait;

class User extends Model
{
    use PerPageResolverTrait;
// ...
```

... or extends package Model class:

```
class User extends \Roquie\LaravelPerPageResolver\Model
{
// ...
```

Run it!

Upgrade
-------

[](#upgrade)

3. So, if you update the package from `1.*` to `2.*` version what you need to know:

- it breaks backwards compatibility
- supported ONLY PHP 8.0
- supported ONLY Laravel ^8, ^9.
- updated a `illuminate/database` package to `^8` due to security reason.

2. So, if you update the package from `1.1.0` to `1.2.*` version what you need to know:

- backward compatibility there is
- supported PHP 8.0, 7.4, 7.3
- supported Laravel ^5, ^6, ^7, ^8, ^9.

1. So, if you update the package from `1.0.0` to `1.1.0` version what you need to know:

- backward compatibility there is
- fixed "bug", when other query parameters does not append to uri
- added package-auto-discovery functional.

Tests
-----

[](#tests)

100% code coverage. Includes integration tests.

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2021 Roquie

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity74

Established project with proven stability

 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 ~215 days

Recently: every ~300 days

Total

8

Last Release

1918d ago

Major Versions

0.1.1 → 1.0.02017-09-01

1.2.1 → 2.0.02021-03-31

PHP version history (2 changes)1.2.0PHP &gt;=7.3

2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/35d8eff4a3e66b58f3e2af56fe948035469de1e19ac29c532d65c681955bbd18?d=identicon)[Roquie](/maintainers/Roquie)

---

Top Contributors

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

---

Tags

eloquentlaravellimitpaginatepaginationperpage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/roquie-laravel-perpage-resolver/health.svg)

```
[![Health](https://phpackages.com/badges/roquie-laravel-perpage-resolver/health.svg)](https://phpackages.com/packages/roquie-laravel-perpage-resolver)
```

###  Alternatives

[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M23](/packages/yajra-laravel-oci8)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M91](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M42](/packages/kirschbaum-development-eloquent-power-joins)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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