PHPackages                             danbovey/laravel-linkheader-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. [HTTP &amp; Networking](/categories/http)
4. /
5. danbovey/laravel-linkheader-paginator

ActiveLibrary[HTTP &amp; Networking](/categories/http)

danbovey/laravel-linkheader-paginator
=====================================

Laravel Paginator that moves pagination info to the HTTP LinkHeader

1.0.1(9y ago)34.0k1[2 issues](https://github.com/danbovey/laravel-linkheader-paginator/issues)MITPHP

Since Nov 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/danbovey/laravel-linkheader-paginator)[ Packagist](https://packagist.org/packages/danbovey/laravel-linkheader-paginator)[ Docs](https://github.com/danbovey/laravel-linkheader-paginator)[ RSS](/packages/danbovey-laravel-linkheader-paginator/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Laravel LinkHeader Paginator
============================

[](#laravel-linkheader-paginator)

[![Travis](https://camo.githubusercontent.com/dc446980cfbd72ad1a607ac898b154f7508afb90e0ffac5f53029fe2e77a1941/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616e626f7665792f6c61726176656c2d6c696e6b6865616465722d706167696e61746f722e737667)](https://travis-ci.org/danbovey/laravel-linkheader-paginator)[![Packagist Downloads](https://camo.githubusercontent.com/bc7787c078cd3fd9ee021ae9cf1bd7334a83ad77c15dbef07179f5aad5b33d21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616e626f7665792f6c61726176656c2d6c696e6b6865616465722d706167696e61746f722e737667)](https://packagist.org/packages/danbovey/laravel-linkheader-paginator)[![Version](https://camo.githubusercontent.com/3ce587f02aecc2af589f79796248619d06885f8f9c17adf383da2133aadd7f61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616e626f7665792f6c61726176656c2d6c696e6b6865616465722d706167696e61746f722e737667)](https://packagist.org/packages/danbovey/laravel-linkheader-paginator)[![License](https://camo.githubusercontent.com/351231bf48552d53f6c0789128b6990f533ed8e881e48766d1fdf323e48ac789/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64616e626f7665792f6c61726176656c2d6c696e6b6865616465722d706167696e61746f722e737667)](https://raw.githubusercontent.com/danbovey/laravel-linkheader-paginator/master/LICENSE)

A custom Laravel/Lumen Paginator that uses the [Link header (RFC 5988)](https://tools.ietf.org/html/rfc5988) to send pagination info in the response. Removes the envelope around `data`!

Adds a method called `toResponse` that returns a JSON response with headers. The `getHeaders` method exists if you need different response data.

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

[](#installation)

```
$ composer require danbovey/laravel-linkheader-paginator

```

Usage
-----

[](#usage)

Create the pagination with the Eloquent/DB Builder and pass it to the `LengthAwarePaginator`.

```
$items = User::where('active', 1)->paginate(20);

$paginator = new LengthAwarePaginator($items);

return $paginator->toResponse();
```

**"Simple Pagination"**

The simple paginator does not need to know the total number of items in the result set; however, because of this, the class does not return the URI of the last page. Ironically, the simple paginator is more work using this library. To save on queries you should skip using the method`simplePaginate`, and implement the `skip`/`take` logic yourself.

```
$page = $request->get('page');
$perPage = 20;
// Take one more than needed to see if there is a next page
$users = User::skip(($page - 1) * $perPage)
    ->take($perPage + 1);

$paginator = new Paginator($simple, $items);

return $paginator->toResponse();
```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3572d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8735132202fca41ab7eae34aa5ed2350ea7c8906b81e60e1cbc9e6a7be90235c?d=identicon)[danbovey](/maintainers/danbovey)

---

Top Contributors

[![danbovey](https://avatars.githubusercontent.com/u/1503076?v=4)](https://github.com/danbovey "danbovey (8 commits)")

---

Tags

laravellaravel-paginationlink-headerlaravelpaginatorpaginationlinkheader

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/danbovey-laravel-linkheader-paginator/health.svg)

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

###  Alternatives

[lampager/lampager-laravel

Rapid pagination for Laravel

7643.3k](/packages/lampager-lampager-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

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