mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
Merge pull request #2 from HolyHugo/useQueryParams_getFullList
Adding queryParams in curl call
This commit is contained in:
@@ -40,7 +40,8 @@ class Collection
|
|||||||
public function getFullList(int $batch = 200, array $queryParams = [])
|
public function getFullList(int $batch = 200, array $queryParams = [])
|
||||||
{
|
{
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $this->url . "/api/collections/" . $this->collection . "/records");
|
$getParams = !empty($queryParams) ? http_build_query($queryParams) : "";
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $this->url . "/api/collections/" . $this->collection . "/records?".$getParams);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
if (self::$token != '') {
|
if (self::$token != '') {
|
||||||
$headers = array(
|
$headers = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user