PHPackages                             askedio/laravel-item-paginate - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. askedio/laravel-item-paginate

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

askedio/laravel-item-paginate
=============================

Paginate based on last item, not pages.

1.2.0(9y ago)667.3k2[3 issues](https://github.com/Askedio/laravel-item-paginate/issues)MITPHPPHP &gt;=5.5.9

Since Aug 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Askedio/laravel-item-paginate)[ Packagist](https://packagist.org/packages/askedio/laravel-item-paginate)[ RSS](/packages/askedio-laravel-item-paginate/feed)WikiDiscussions master Synced 4w ago

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

Laravel Item Paginator
======================

[](#laravel-item-paginator)

Paginate based on last item, not page.

[![Build Status](https://camo.githubusercontent.com/8336fb6a466f64560725e96472f2064b9a2ea715b5a5843a4f55decbe9aba9d2/68747470733a2f2f7472617669732d63692e6f72672f41736b6564696f2f6c61726176656c2d6974656d2d706167696e6174652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Askedio/laravel-item-paginate)[![StyleCI](https://camo.githubusercontent.com/6cf4d3e51a43ed4da1ea326bf35aa7755b015adcaa9b56c0a46dbaf940f26d47/68747470733a2f2f7374796c6563692e696f2f7265706f732f36343733363935372f736869656c64)](https://styleci.io/repos/64736957)[![Codacy Badge](https://camo.githubusercontent.com/9a851eb3783e2beb5ce8017d721c4bd7495334d574c9ed232ca478546a56531f/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3762306530326637323865653439356638333238633636303365633234633162)](https://www.codacy.com/app/gcphost/laravel-item-paginate?utm_source=github.com&utm_medium=referral&utm_content=Askedio/laravel-item-paginate&utm_campaign=Badge_Grade)[![Codacy Badge](https://camo.githubusercontent.com/7653cb85d0f558e56451305b7de3637a142db4381e335a5611e29b6b53f29e78/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3762306530326637323865653439356638333238633636303365633234633162)](https://www.codacy.com/app/gcphost/laravel-item-paginate?utm_source=github.com&utm_medium=referral&utm_content=Askedio/laravel-item-paginate&utm_campaign=Badge_Coverage)

Installation
============

[](#installation)

```
composer require askedio/laravel-item-paginate

```

Add the following trait to your Models.

```
use \Askedio\ItemPaginator\ItemPaginatorTrait;
```

Add the following provider to `config/app.php`

```
\Askedio\ItemPaginator\ItemPaginatorServiceProvider::class,
```

Usage
=====

[](#usage)

This package is based off simplePaginate and will take the same parameters.

```
$users = new User();

$paginated = $users->itemPaginate();

dd($paginated);
```

The last parameter is the field that will be used to paginate by, defaults to `id`.

```
itemPaginate($perPage = null, $columns = ['*'], $pageName = 'from', $from = 0, $field = null)
```

ORDER BY DESC
=============

[](#order-by-desc)

If you want to decend your sorting you'll want to use `itemPaginateDesc` instead of `itemPaginate`. The first page will add an extra query to find the last item.

Example Output
==============

[](#example-output)

```
array:6 [
  "limit" => 2
  "next_page_url" => "http://localhost?from=190"
  "from" => 100
  "to" => 190
  "data" => array:2 [
    0 => array:8 [
      "id" => 100
      "name" => "test"
      "email" => "test@test.com"
      "password" => "test"
      "remember_token" => null
      "created_at" => "2016-08-02 18:13:19"
      "updated_at" => "2016-08-02 18:13:19"
      "deleted_at" => null
    ]
    1 => array:8 [
      "id" => 190
      "name" => "test2"
      "email" => "test2@test.com"
      "password" => "test"
      "remember_token" => null
      "created_at" => "2016-08-02 18:13:19"
      "updated_at" => "2016-08-02 18:13:19"
      "deleted_at" => null
    ]
  ]
]
```

Disclaimer
==========

[](#disclaimer)

### Will only sort by incremental ids.

[](#will-only-sort-by-incremental-ids)

I've only tested this with `sqlite` and `mysql` (see tests) so it may not work in every situation. Please report any you find.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

3592d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1173636?v=4)[William](/maintainers/gcphost)[@gcphost](https://github.com/gcphost)

---

Top Contributors

[![gcphost](https://avatars.githubusercontent.com/u/1173636?v=4)](https://github.com/gcphost "gcphost (40 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/askedio-laravel-item-paginate/health.svg)

```
[![Health](https://phpackages.com/badges/askedio-laravel-item-paginate/health.svg)](https://phpackages.com/packages/askedio-laravel-item-paginate)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

591.7k1](/packages/crumbls-layup)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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