PHPackages                             ezavalishin/laravel-jsonapi-paginator - 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. [API Development](/categories/api)
4. /
5. ezavalishin/laravel-jsonapi-paginator

ActiveLibrary[API Development](/categories/api)

ezavalishin/laravel-jsonapi-paginator
=====================================

:package\_description

0.1.3(5y ago)010MITPHPPHP ^7.4CI failing

Since Aug 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ezavalishin/laravel-jsonapi-paginator)[ Packagist](https://packagist.org/packages/ezavalishin/laravel-jsonapi-paginator)[ Docs](https://github.com/ezavalishin/laravel-jsonapi-paginator)[ RSS](/packages/ezavalishin-laravel-jsonapi-paginator/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (7)Versions (6)Used By (0)

laravel-jsonapi-paginator
=========================

[](#laravel-jsonapi-paginator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7f07c2449f6f85195a6c4b7e04ccbe4537a0c05569f89359417979cdf94f9766/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657a6176616c697368696e2f6c61726176656c2d6a736f6e6170692d706167696e61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ezavalishin/laravel-jsonapi-paginator)[![Total Downloads](https://camo.githubusercontent.com/c7230a4480a912641d8533a48c6b305682b2ada8bcac8bbadc1f69980339bf4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657a6176616c697368696e2f6c61726176656c2d6a736f6e6170692d706167696e61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ezavalishin/laravel-jsonapi-paginator)[![StyleCI](https://camo.githubusercontent.com/63cad54b713260711d7bed23508e8ab0930672d03dcb80e63cb94fac9a9896ba/68747470733a2f2f7374796c6563692e696f2f7265706f732f3238373832343431302f736869656c64)](https://styleci.io/repos/287824410)[![Codecov](https://camo.githubusercontent.com/6e33bc29ad90d2811a7bd4a3c47db16a3537f8c69c79f448946670316c04eb28/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f657a6176616c697368696e2f6c61726176656c2d6a736f6e6170692d706167696e61746f72)](https://codecov.io/github/ezavalishin/laravel-jsonapi-paginator)[![Travis (.com)](https://camo.githubusercontent.com/3e567ef5e3048511f22d6d3136554ef1cc4938bb14c41e6b172ee97e0369c0b9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f657a6176616c697368696e2f6c61726176656c2d6a736f6e6170692d706167696e61746f72)](https://travis-ci.org/ezavalishin/laravel-jsonapi-paginator)

This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require ezavalishin/laravel-jsonapi-paginator
```

Optionally you can publish the config file with:

```
$ php artisan vendor:publish --provider="ezavalishin/LaravelJsonApiPaginator\LaravelJsonApiPaginatorServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

To paginate the results according to the json API spec, simply call the jsonPaginate method.

```
YourModel::jsonApiPaginate();
```

Of course you may still use all the builder methods you know and love:

```
YourModel::where('my_field', 'myValue')->jsonApiPaginate();
```

By default the maximum page size is set to 30. You can change this number in the config file or just pass the value to jsonPaginate.

```
$maxResults = 60;

YourModel::jsonApiPaginate($maxResults);
```

### Offset based pagination

[](#offset-based-pagination)

Supports: `?page[offset]` and `?page[limit]`

### Page based pagination

[](#page-based-pagination)

Supports: `?page[number]` and `?page[size]`

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Evgeniy Zavalishin](https://github.com/ezavalishin)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

5

Last Release

2028d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25b8883072798badea2a067931cfccbd1c2c9e5b4f8b2fa35923a813b92705eb?d=identicon)[ezavalishin](/maintainers/ezavalishin)

---

Top Contributors

[![ezavalishin](https://avatars.githubusercontent.com/u/2995902?v=4)](https://github.com/ezavalishin "ezavalishin (24 commits)")

---

Tags

laravelLaravelJsonApiPaginator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ezavalishin-laravel-jsonapi-paginator/health.svg)

```
[![Health](https://phpackages.com/badges/ezavalishin-laravel-jsonapi-paginator/health.svg)](https://phpackages.com/packages/ezavalishin-laravel-jsonapi-paginator)
```

###  Alternatives

[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k10.7M93](/packages/nuwave-lighthouse)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3171.8k](/packages/joggapp-laravel-aws-sns)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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