Skip to content

Commit 31f0b7a

Browse files
authored
Check if subscriptions exists
empty() replaced by isEmpty() since empty() does not work for a collection instance.
1 parent 0623c5a commit 31f0b7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebPushChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function send($notifiable, Notification $notification)
4141
/** @var \Illuminate\Database\Eloquent\Collection $subscriptions */
4242
$subscriptions = $notifiable->routeNotificationFor('WebPush', $notification);
4343

44-
if (empty($subscriptions)) {
44+
if ($subscriptions->isEmpty()) {
4545
return;
4646
}
4747

0 commit comments

Comments
 (0)