/** * Send post requests * * @param array $attributes * @param array $optionsOverride * * @return \Illuminate\Support\Collection */ public function post(array $attributes, array $optionsOverride = []) { if (!empty($optionsOverride)) { $promises = ['base' => $this->client->postAsync($this->getEndpoint(), $optionsOverride)]; } else { $promises = ['base' => $this->client->postAsync($this->getEndpoint(), ['json' => $attributes])]; } $response = $this->send($promises); return $this->getCollectionFromResponse($response); }