diff --git a/.gitignore b/.gitignore index 8bc11e4..79285c9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ composer.phar composer.lock vendor/ +.idea \ No newline at end of file diff --git a/src/Picqer/Carriers/SendCloud/Connection.php b/src/Picqer/Carriers/SendCloud/Connection.php index a0f2024..ad0d7a9 100644 --- a/src/Picqer/Carriers/SendCloud/Connection.php +++ b/src/Picqer/Carriers/SendCloud/Connection.php @@ -111,13 +111,14 @@ public function apiUrl() /** * Perform a GET request * @param string $url + * @param array $params * @return array * @throws SendCloudApiException */ - public function get($url) + public function get($url, $params = []) { try { - $result = $this->client()->get($url); + $result = $this->client()->get($url, ['query' => $params]); return $this->parseResponse($result); } catch (RequestException $e) { if ($e->hasResponse()) { diff --git a/src/Picqer/Carriers/SendCloud/Query/FindAll.php b/src/Picqer/Carriers/SendCloud/Query/FindAll.php index e61f4af..84a292d 100644 --- a/src/Picqer/Carriers/SendCloud/Query/FindAll.php +++ b/src/Picqer/Carriers/SendCloud/Query/FindAll.php @@ -14,9 +14,9 @@ trait FindAll { - public function all() + public function all($params = []) { - $result = $this->connection()->get($this->url); + $result = $this->connection()->get($this->url, $params); return $this->collectionFromResult($result); }