Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pagination Plugin Laravel Package

saloonphp/pagination-plugin

Adds paginated response support to SaloonPHP. Provides a PaginationPlugin with helpful abstractions to iterate through pages and results when working with APIs that return paginated data, keeping pagination logic out of your connectors and requests.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API Data Pipeline Efficiency: Accelerate development of paginated API integrations (e.g., CRM syncs, analytics dashboards) by reducing boilerplate for fetching/processing large datasets. Example: Cut 30% of dev time for a Stripe connector handling 10K+ records.
  • Scalable Data Migration: Enable bulk operations (e.g., migrating user data from legacy systems) via chunked, async pagination with Laravel Queues, reducing memory spikes and improving reliability.
  • Unified Pagination Strategy: Standardize pagination handling across microservices or monoliths using Saloon connectors, ensuring consistency in API interactions (e.g., page/limit, cursor-based, or custom).
  • Roadmap for "Data Products": Justify investment in internal tools (e.g., a "Data Export" feature) by leveraging this plugin to handle edge cases like rate limits, retries, and large payloads without custom engineering.
  • Build vs. Buy: Buy for teams already using Saloon; build only if requiring deep Laravel-specific integrations (e.g., Scout, Horizon) or non-standard pagination logic.
  • Use Cases:
    • Bulk Data Processing: Syncing external APIs (e.g., Shopify, Salesforce) with Laravel models.
    • Admin Panels: Fetching paginated datasets (e.g., orders, users) with server-side pagination.
    • ETL Pipelines: Extracting, transforming, and loading data in chunks to avoid timeouts.
    • Real-Time Updates: Using async pagination with Laravel Echo to stream paginated API updates.

When to Consider This Package

Adopt if:

  • Your team uses Saloon v3/v4 for API interactions and needs pagination support.
  • You’re building data-heavy features (e.g., imports, exports, syncs) requiring efficient handling of large datasets.
  • You prioritize developer velocity over custom solutions, especially for standard pagination patterns (page/limit, cursor).
  • Your stack includes Laravel and you want to leverage its ecosystem (caching, queues, testing tools).
  • You need async-friendly pagination to avoid memory issues with large payloads.

Look elsewhere if:

  • You’re not using Saloon (tight coupling requires migration or wrapper layer).
  • Your API pagination is highly custom (e.g., non-standard headers, nested cursors) and the plugin’s strategies don’t cover your use case.
  • You require native Laravel integrations (e.g., Scout, Horizon) that aren’t supported out-of-the-box.
  • Your team prefers zero-dependency solutions or has strict policies against external plugins.
  • You’re processing truly massive datasets (e.g., 10M+ records) where even async chunking may hit limits (consider a dedicated ETL tool like Laravel Nova’s imports or custom queue workers).

How to Pitch It (Stakeholders)

For Executives: "This plugin lets us build paginated API integrations 10x faster while reducing technical debt. For example, syncing 50K customer records from HubSpot would take weeks to build from scratch but hours with this tool. It also future-proofs our data pipelines by handling edge cases like rate limits, retries, and memory management automatically. The cost? Minimal—just a few hours to integrate, with payback in days. It’s a no-brainer for scaling our CRM or analytics tools."

For Engineering: *"The saloonphp/pagination-plugin gives us a battle-tested way to handle pagination without reinventing the wheel. Key benefits:

  • Plug-and-play: Works with Saloon connectors out-of-the-box for standard APIs (GitHub, Stripe, etc.).
  • Async-ready: Chunked processing with Laravel Queues avoids memory issues for large datasets.
  • Testable: Built-in helpers for mocking and assertions speed up QA.
  • Future-proof: Supports multiple pagination strategies (page/limit, cursor) and is actively maintained.

Tradeoff: It’s Saloon-specific, so if we’re not using Saloon, we’d need to evaluate alternatives. But for our current stack, this cuts dev time by ~30% and reduces bugs in pagination logic."*

For Developers: *"This plugin eliminates pagination boilerplate in Saloon connectors. Instead of manually parsing next_page links or writing loops for page/limit APIs, you define a strategy once and let it handle the rest. For example:

$connector->paginate('users')->each(function ($user) {
    User::create($user->toArray());
});
// Automatically fetches all pages, handles errors, and respects rate limits.

It also plays nicely with Laravel’s caching and queues, so you can process millions of records without crashing your server. Win."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport