PHPackages                             robertogallea/laravel-lazy-rest - 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. robertogallea/laravel-lazy-rest

ActiveLibrary

robertogallea/laravel-lazy-rest
===============================

Package for trasparently loading paginated rest resources into lazy collections

1.1(6y ago)14121MITPHPPHP &gt;=7.2.5CI failing

Since Dec 4Pushed 6y ago2 watchersCompare

[ Source](https://github.com/robertogallea/Laravel-Lazy-Rest)[ Packagist](https://packagist.org/packages/robertogallea/laravel-lazy-rest)[ RSS](/packages/robertogallea-laravel-lazy-rest/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

Laravel-Lazy-Rest
=================

[](#laravel-lazy-rest)

This package provides loading of RESTful paginated resources using Laravel LazyCollection capabilities. In this way, no complicate mechanisms for on-demand paginated data handling is required because the package manages all the complexity transparently for you, and only if required.

```
$paginatedEndpoint = 'http://api.with-15-elements-per-page';

$collection = \LazyRest::load($paginatedEndpoint);

// Loads only first page
dump($collection->skip(10)->first());

// loads all the pages
dump($collection->last());
```

1. Installation
---------------

[](#1-installation)

To install the package, run the command

`composer require robertogallea/laravel-lazy-rest`

ServiceProvider and Facade alias included in the package are autoloaded automatically using Laravel auto-discovery service.

2. Configuration
----------------

[](#2-configuration)

By default, the package is configured to search for `data` field in the json response and `next_page_url` to detect how to fetch the next page of results. However you could easily change this behavior by overriding default configuration:

1. Publish config: `php artisan vendor:publish --provider="robertogallea\LaravelLazyRest\LazyRestServiceProvider" --tag=config`
2. Edit `config/lazy-rest.php`

```
'fields' => [
    'next_page_url' => 'next_page_url',
    'data' => 'data',

    'timeout' => 5.0,
];
```

if your data are in the root of the response use `_` character as field name (even though this means your endpoint doesn't provide paginated data.

3. Issues, Questions and Pull Requests
======================================

[](#3-issues-questions-and-pull-requests)

You can report issues and ask questions in the [issues section](https://github.com/robertogallea/Laravel-Lazy-Rest/issues). Please start your issue with ISSUE: and your question with QUESTION:

If you have a question, check the closed issues first. Over time, I've been able to answer quite a few.

To submit a Pull Request, please fork this repository, create a new branch and commit your new/updated code in there. Then open a Pull Request from your new branch. Refer to [this guide](https://help.github.com/articles/about-pull-requests/) for more info.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

Total

2

Last Release

2261d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/818f547bcf73a82393d9014c85c90c83d760102a8d4dfe806353afb83848a901?d=identicon)[robertogallea](/maintainers/robertogallea)

---

Top Contributors

[![robertogallea](https://avatars.githubusercontent.com/u/19411470?v=4)](https://github.com/robertogallea "robertogallea (9 commits)")[![pkboom](https://avatars.githubusercontent.com/u/13960169?v=4)](https://github.com/pkboom "pkboom (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robertogallea-laravel-lazy-rest/health.svg)

```
[![Health](https://phpackages.com/badges/robertogallea-laravel-lazy-rest/health.svg)](https://phpackages.com/packages/robertogallea-laravel-lazy-rest)
```

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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