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

ActiveLibrary[API Development](/categories/api)

denmasyarikin/laravel-api-pagination
====================================

API Pagination For Laravel &amp; Lumen

0.1.8(4y ago)0330MITPHPPHP &gt;=7.0

Since Feb 21Pushed 4y agoCompare

[ Source](https://github.com/denmasyarikin/laravel-api-pagination)[ Packagist](https://packagist.org/packages/denmasyarikin/laravel-api-pagination)[ RSS](/packages/denmasyarikin-laravel-api-pagination/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (10)Used By (0)

Note
====

[](#note)

Inspired By Illuminate Pagination, This Package Used For Api Pagination (by limit/offset)

Changelog
=========

[](#changelog)

- **0.1.6** Fix Wrong Default Limit Value
- **0.1.5** Fix Error When No Data
- **0.1.4** Fix Typo.
- **0.1.3** Fix Scope.
- **0.1.2** Bump Version.
- **0.1.1** Fix Unresolved Dependency.
- **0.1.0** Init Version.

How to install (steps)
----------------------

[](#how-to-install-steps)

### 1. Install using Composer

[](#1-install-using-composer)

```
composer require "elemenx/laravel-api-pagination"

```

### 2. Required changes in bootstrap/app.php (If using Lumen)

[](#2-required-changes-in-bootstrapappphp-if-using-lumen)

On bootstrap/app.php add:

```
$app->register(ElemenX\ApiPagination\PaginationServiceProvider::class);

```

### 3.Add Trait in Your Models

[](#3add-trait-in-your-models)

```
use ElemenX\ApiPagination\Paginatable;

class User {
    use Paginatable;
}

```

Example
-------

[](#example)

This is an example for how to use this package.

```
$users = User::apiPaginate(100); // 100 is your defalut limit number

```

when you visit with

```
http://api.dev/user?limit=100&offset=0

```

It will return Structure As follows.

```
[
    'data' => [
        [
            'id' => 1,
            'name' => 'test'
        ]
    ],
    'meta' => [
        'limit' => 100,
        'offset' => 0,
        'total' => 1
    ]
]

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~175 days

Recently: every ~349 days

Total

9

Last Release

1602d ago

### Community

Maintainers

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

---

Top Contributors

[![branchzero](https://avatars.githubusercontent.com/u/7685609?v=4)](https://github.com/branchzero "branchzero (7 commits)")[![denmasyarikin](https://avatars.githubusercontent.com/u/18554343?v=4)](https://github.com/denmasyarikin "denmasyarikin (3 commits)")

---

Tags

apilaravellumenpaginationelemenx

### Embed Badge

![Health badge](/badges/denmasyarikin-laravel-api-pagination/health.svg)

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

###  Alternatives

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k15.1M99](/packages/spatie-laravel-fractal)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[shipu/php-aamarpay-payment

PHP client for Aamarpay Payment Gateway API

3214.6k](/packages/shipu-php-aamarpay-payment)[nilportugues/laravel5-json-api-dingo

Laravel5 JSONAPI and Dingo together to build APIs fast

311.5k](/packages/nilportugues-laravel5-json-api-dingo)

PHPackages © 2026

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