Permalink
Browse files

remove events since they are now fired in laravel core

  • Loading branch information...
1 parent 6b7026f commit 00a48155660d2c926aec8d60bad2190fded5d2b5 @themsaid themsaid committed Aug 16, 2016
Showing with 0 additions and 57 deletions.
  1. +0 −24 src/Events/MessageWasSent.php
  2. +0 −25 src/Events/SendingMessage.php
  3. +0 −8 src/ServiceNameChannel.php
@@ -1,24 +0,0 @@
-<?php
-
-namespace NotificationChannels\:channel_namespace\Events;
-
-use Illuminate\Notifications\Notification;
-
-class MessageWasSent
-{
- protected $notifiable;
-
- /** @var \Illuminate\Notifications\Notification */
- protected $notification;
-
- /**
- * @param $notifiable
- * @param \Illuminate\Notifications\Notification $notification
- */
- public function __construct($notifiable, Notification $notification)
- {
- $this->notifiable = $notifiable;
-
- $this->notification = $notification;
- }
-}
@@ -1,25 +0,0 @@
-<?php
-
-namespace NotificationChannels\:channel_namespace\Events;
-
-use Illuminate\Notifications\Notification;
-
-class SendingMessage
-{
-
- protected $notifiable;
-
- /** @var \Illuminate\Notifications\Notification */
- protected $notification;
-
- /**
- * @param $notifiable
- * @param \Illuminate\Notifications\Notification $notification
- */
- public function __construct($notifiable, Notification $notification)
- {
- $this->notifiable = $notifiable;
-
- $this->notification = $notification;
- }
-}
@@ -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.