mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
add perPage from params to queryParams
This commit is contained in:
@@ -40,6 +40,7 @@ class Collection
|
|||||||
*/
|
*/
|
||||||
public function getList(int $start = 1, int $end = 50, array $queryParams = []): array
|
public function getList(int $start = 1, int $end = 50, array $queryParams = []): array
|
||||||
{
|
{
|
||||||
|
$queryParams['perPage'] = $end;
|
||||||
$getParams = !empty($queryParams) ? http_build_query($queryParams) : "";
|
$getParams = !empty($queryParams) ? http_build_query($queryParams) : "";
|
||||||
$response = $this->doRequest($this->url . "/api/collections/" . $this->collection . "/records?" . $getParams, 'GET');
|
$response = $this->doRequest($this->url . "/api/collections/" . $this->collection . "/records?" . $getParams, 'GET');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user