GitHub Sponsors
Sponsor-only
Laravel Code Architecture

Abstract pagination with lazy collections

3 years ago
8 min read

In my humble opinion, Lazy Collections don’t get nearly enough credit. They enable you to abstract complex fetching mechanisms inside the same familiar Collection API we all love.

In this article, we will see how we can leverage them to abstract the pagination of our API calls.

We want jobs!

Say we have a Laravel application that aggregates job positions from various platforms.

This content is for GitHub Sponsors only

Sponsor me on GitHub to read this article and get access to the full library of sponsor-only posts.

GitHub Sponsors
Become a Sponsor

Once you're a sponsor, login with your GitHub account to unlock immediate access to all perks!

Already have an account? Click here to login.