diff --git a/src/Notifications/Channels/BroadcastChannel.php b/src/Notifications/Channels/BroadcastChannel.php index 20a46c7..66657f5 100644 --- a/src/Notifications/Channels/BroadcastChannel.php +++ b/src/Notifications/Channels/BroadcastChannel.php @@ -52,6 +52,10 @@ public function send($notifiable, Notification $notification) */ protected function getData($notifiable, Notification $notification) { + if (method_exists($notification, 'toBroadcast')) { + return $notification->toBroadcast($notifiable); + } + if (method_exists($notification, 'toArray')) { return $notification->toArray($notifiable); }