From df67817a21791a80e4ec23f4c3bd7641ec6a289d Mon Sep 17 00:00:00 2001 From: George Hanson Date: Thu, 30 Jun 2016 16:07:15 +0100 Subject: [PATCH] Fixed bug with sending to groups --- src/Feed.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Feed.php b/src/Feed.php index 48936fb..3e91e04 100644 --- a/src/Feed.php +++ b/src/Feed.php @@ -57,7 +57,7 @@ public function push($notification, $notifiable) } foreach ($notifiable as $toBeNotified) { - if ( ! $toBeNotified instanceof Notifiable) { + if ( ! $toBeNotified instanceof Notifiable && !$tobeNotified instanceof NotifiableGroup) { throw new NotNotifiableException("The notifiable members must implement the notifiable interface."); } } @@ -75,7 +75,7 @@ public function push($notification, $notifiable) * @param string|array $notification * @param Notifiable $notifiable */ - protected function pushNotification($notification, Notifiable $notifiable) + protected function pushNotification($notification, $notifiable) { if ($notifiable instanceof NotifiableGroup) { foreach ($notifiable->getGroup() as $toBeNotified) {