Skip to content

Commit

Permalink
remove events since they are now fired in laravel core
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Aug 16, 2016
1 parent 6b7026f commit 00a4815
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 57 deletions.
24 changes: 0 additions & 24 deletions src/Events/MessageWasSent.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Events/SendingMessage.php

This file was deleted.

8 changes: 0 additions & 8 deletions src/ServiceNameChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,10 @@ public function __construct()
*/
public function send($notifiable, Notification $notification)
{
$shouldSendMessage = event(new SendingMessage($notifiable, $notification), [], true) !== false;

if (! $shouldSendMessage) {
return;
}

//$response = [a call to the api of your notification send]

// if ($response->error) { // replace this by the code need to check for errors
// throw CouldNotSendNotification::serviceRespondedWithAnError($response);
// }

event(new MessageWasSent($notifiable, $notification));
}
}

0 comments on commit 00a4815

Please sign in to comment.