diff --git a/src/Feed.php b/src/Feed.php index be402bd..48936fb 100644 --- a/src/Feed.php +++ b/src/Feed.php @@ -13,6 +13,7 @@ use Michaeljennings\Feed\Events\NotificationRead; use Michaeljennings\Feed\Events\NotificationUnread; use Michaeljennings\Feed\Exceptions\NotNotifiableException; +use Traversable; class Feed implements PushFeed, PullFeed { @@ -51,7 +52,7 @@ public function __construct(Repository $repository) */ public function push($notification, $notifiable) { - if ( ! is_array($notifiable)) { + if ( ! is_array($notifiable) && ! $notifiable instanceof Traversable) { $notifiable = [$notifiable]; }