Skip to content

Commit

Permalink
ISSUE-97: No Pagination when using search method of Records Module: a…
Browse files Browse the repository at this point in the history
…dded Pagination when constructing the collection from the response
  • Loading branch information
Bert Van de Casteele committed Jan 4, 2024
1 parent b6baecd commit f2da072
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Modules/Records.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Webleit\ZohoCrmApi\Client;
use Webleit\ZohoCrmApi\Models\Record;
use Webleit\ZohoCrmApi\RecordCollection;
use Webleit\ZohoCrmApi\Request\Pagination;

class Records extends Module
{
Expand Down Expand Up @@ -45,6 +46,7 @@ public function search(string $criteria, string $key = 'criteria', array $params

return [$item->getId() => $item];
});
$collection->withPagination(new Pagination($list['info'] ?? []));

return $collection;
}
Expand Down

0 comments on commit f2da072

Please sign in to comment.