Skip to content

Commit

Permalink
Merge pull request #1 from perifer/master
Browse files Browse the repository at this point in the history
Error support for Laravel 5.8

New minimum requirements are now Laravel 5.4
  • Loading branch information
larsemil authored Aug 8, 2019
2 parents f96718b + 1a488a5 commit cc34c8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"php": ">=5.6.4",
"guzzlehttp/guzzle": "^6.3",
"illuminate/events": "^5.7",
"illuminate/notifications": "^5.3",
"illuminate/support": "^5.1|^5.2|^5.3"
"illuminate/notifications": "^5.4",
"illuminate/support": "^5.4"
},
"require-dev": {
"mockery/mockery": "^0.9.5",
Expand Down
2 changes: 1 addition & 1 deletion src/FortySixElksChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function send($notifiable, Notification $notification)
try {
$media->send();
} catch(\Exception $e){
$this->events->fire(new NotificationFailed($notifiable, $notification, get_class($this), ['exception' => $e]));
$this->events->dispatch(new NotificationFailed($notifiable, $notification, get_class($this), ['exception' => $e]));
}
}
}
Expand Down
9 changes: 2 additions & 7 deletions src/FortySixElksMMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function image($url){
public function send() {

try {
echo 'doing request';
$response = $this->client->request( 'POST', $this->endpoint, [
'form_params' => [
'from' => $this->from,
Expand All @@ -42,18 +41,14 @@ public function send() {
],

] );
echo 'did request';
var_dump($response);
} catch ( GuzzleHttp\Exception\BadResponseException $e ) {
} catch ( \GuzzleHttp\Exception\BadResponseException $e ) {
$response = $e->getResponse();
var_dump('WHOOT');
throw CouldNotSendNotification::serviceRespondedWithAnError($response->getBody()->getContents(), $response->getStatusCode());

}
echo "hmm";
return $this;
}



}
}
4 changes: 2 additions & 2 deletions src/FortySixElksSMS.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function send() {
],

] );
} catch ( GuzzleHttp\Exception\BadResponseException $e ) {
} catch ( \GuzzleHttp\Exception\BadResponseException $e ) {
$response = $e->getResponse();
throw CouldNotSendNotification::serviceRespondedWithAnError($response->getBody()->getContents(), $response->getStatusCode());
}
Expand All @@ -49,4 +49,4 @@ public function flash() {
$this->payload['flash'] = true;
return $this;
}
}
}

0 comments on commit cc34c8e

Please sign in to comment.