PHPackages                             creativecrafts/laravel-paginate-collection - 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. creativecrafts/laravel-paginate-collection

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

creativecrafts/laravel-paginate-collection
==========================================

A handy package to paginate laravel collection

1.0.1(2y ago)11.0k[2 PRs](https://github.com/CreativeCrafts/laravel-paginate-collection/pulls)MITPHPPHP ^8.2CI passing

Since Jan 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/CreativeCrafts/laravel-paginate-collection)[ Packagist](https://packagist.org/packages/creativecrafts/laravel-paginate-collection)[ Docs](https://github.com/creativecrafts/laravel-paginate-collection)[ RSS](/packages/creativecrafts-laravel-paginate-collection/feed)WikiDiscussions main Synced yesterday

READMEChangelog (8)Dependencies (12)Versions (11)Used By (0)

A handy package to paginate laravel collection
==============================================

[](#a-handy-package-to-paginate-laravel-collection)

[![Latest Version on Packagist](https://camo.githubusercontent.com/801effacdaed47c61b4ca649b9cef3dfce75447dbcf5006d858b06cdbe77bac3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63726561746976656372616674732f6c61726176656c2d706167696e6174652d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creativecrafts/laravel-paginate-collection)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1d0434d4a4e6bba9ab16926e788f255ea20d25bc2937691dc3a8ff98057f6178/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63726561746976656372616674732f6c61726176656c2d706167696e6174652d636f6c6c656374696f6e2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/creativecrafts/laravel-paginate-collection/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/1949618ab8a4fc83cfb61225b368c2f1e98884de3e81ff8c1e81ce90918e1cfe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f63726561746976656372616674732f6c61726176656c2d706167696e6174652d636f6c6c656374696f6e2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/creativecrafts/laravel-paginate-collection/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/623a588f13b4b87c2d39251f49be9ec2a4c4c40ad4c7c3de0b3ce6f8779bbef9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63726561746976656372616674732f6c61726176656c2d706167696e6174652d636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creativecrafts/laravel-paginate-collection)

A handy package to paginate a collection.

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

[](#installation)

You can install the package via composer:

```
composer require creativecrafts/laravel-paginate-collection
```

You can publish the config file with:

```
php artisan vendor:publish --tag="paginate-collection-config"
```

This is the contents of the published config file:

```
return [
   /**
     * This is the default number of items that will be displayed per page.
     * default: 10
     */
    'items_per_page' => 10,

    /**
     * This is the default page name that will be used in the query string.
     * default: page
     */
    'page_name' => 'page',
];
```

Usage
-----

[](#usage)

```
You can use the Facade to paginate a collection
use CreativeCrafts\Paginate\Facades\Paginate
or use the helper function
use CreativeCrafts\Paginate\Paginate;

$collection = collect([
   ['name' => 'Jack', 'age' => 40],
   ['name' => 'John', 'age' => 30],
   ['name' => 'Jane', 'age' => 25],
]);

$paginatedCollection = Paginate::collection($collection, 1);
// output:
// [
//    "current_page" => 1
//    "data" => [
//       0 => [
//          "name" => "Jack"
//          "age" => 40
//       ]
//    ],
//    "first_page_url" => "http://localhost:8000/?page=1"
//    "from" => 1
//    "last_page" => 3
//    "last_page_url" => "http://localhost:8000/?page=3"
//    "next_page_url" => "http://localhost:8000/?page=2"
//    "path" => "http://localhost:8000"
//    "per_page" => 1
//    "prev_page_url" => null
//    "to" => 1
//    "total" => 3
//    "links" => [
//       0 => [
//          "url" => "null",
//          "label" => "&laquo; Previous",
//          "active" => false
//       ],
//       1 => [
//          "url" => "http://localhost:8000/?page=1",
//          "label" => "1",
//          "active" => true
//       ],
//       2 => [
//          "url" => "http://localhost:8000/?page=2",
//          "label" => "2",
//          "active" => false
//       ],
//       3 => [
//          "url" => "http://localhost:8000/?page=3",
//          "label" => "3",
//          "active" => false
//       ],
//       4 => [
//          "url" => "http://localhost:8000/?page=2",
//          "label" => "Next &raquo;",
//          "active" => false
//       ]
//    ]
//]
You can get the default items per page from the config file
$paginatedCollection = Paginate::collection($collection, Paginate::defaultItemsPerPage());

You can also get the default page name that will be used in the query string from the config file
$pageName = Paginate::defaultPageName();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Godspower](https://github.com/rockblings)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 58.5% 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 ~61 days

Recently: every ~107 days

Total

8

Last Release

828d ago

Major Versions

0.2.4 → 1.0.02024-03-17

PHP version history (2 changes)0.0.1PHP ^8.1

1.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b5e5ba42a2029e0f2fa45bd8d874c98599af2d2a1e77bff012ea07eeb0b65bc?d=identicon)[rockblings](/maintainers/rockblings)

---

Top Contributors

[![rockblings](https://avatars.githubusercontent.com/u/5190259?v=4)](https://github.com/rockblings "rockblings (24 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

laravelcreativeCraftslaravel-paginate-collection

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/creativecrafts-laravel-paginate-collection/health.svg)

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

###  Alternatives

[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

124603.0k](/packages/worksome-exchange)[tarfin-labs/event-machine

Event-driven state machines for Laravel with event sourcing, type-safe context, and full audit trail.

199.4k](/packages/tarfin-labs-event-machine)[tapp/filament-form-builder

User facing form builder using Filament components

132.4k3](/packages/tapp-filament-form-builder)

PHPackages © 2026

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