| @@ 41-52 (lines=12) @@ | ||
| 38 | * |
|
| 39 | * @return object |
|
| 40 | */ |
|
| 41 | public function send() |
|
| 42 | { |
|
| 43 | $response = collect(); |
|
| 44 | foreach ($this->recipients as $recipient) { |
|
| 45 | $response->put($recipient, $this->client->send([ |
|
| 46 | 'to' => $recipient, |
|
| 47 | 'message' => $this->body, |
|
| 48 | ])); |
|
| 49 | } |
|
| 50 | ||
| 51 | return (count($this->recipients) == 1) ? $response->first() : $response; |
|
| 52 | } |
|
| 53 | } |
|
| 54 | ||
| @@ 41-52 (lines=12) @@ | ||
| 38 | * |
|
| 39 | * @return mixed |
|
| 40 | */ |
|
| 41 | public function send() |
|
| 42 | { |
|
| 43 | $response = collect(); |
|
| 44 | foreach ($this->recipients as $recipient) { |
|
| 45 | $response->put( |
|
| 46 | $recipient, |
|
| 47 | $this->client->request('POST', $this->settings->url, $this->payload($recipient)) |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | return (count($this->recipients) == 1) ? $response->first() : $response; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @param string $recipient |
|
| @@ 41-52 (lines=12) @@ | ||
| 38 | * |
|
| 39 | * @return mixed |
|
| 40 | */ |
|
| 41 | public function send() |
|
| 42 | { |
|
| 43 | $response = collect(); |
|
| 44 | foreach ($this->recipients as $recipient) { |
|
| 45 | $response->put( |
|
| 46 | $recipient, |
|
| 47 | $this->client->request('POST', $this->settings->url, $this->payload($recipient)) |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | return (count($this->recipients) == 1) ? $response->first() : $response; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @param string $recipient |
|