Pagination
Shopify recently changed their pagination to cursor-based pagination, which require you grab relevant info from the "Link" header.
We've tried to simplify this by wrapping the logic in a Cursor
object that implements the Iterator
interface.
Example of usage:
$pages = $shopify->paginateProducts(['limit' => 100]); // returns Cursor
$results = collect();
foreach ($pages as $page) {
// $page is a Collection of ApiResources
$results = $results->merge($page);
}
Last updated