Skip to content

Commit e97d17c

Browse files
committed
support viaQueues method
1 parent 880b637 commit e97d17c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Illuminate/Notifications/NotificationSender.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,16 @@ protected function queueNotification($notifiables, $notification)
190190
$notification->locale = $this->locale;
191191
}
192192

193+
$queue = $notification->queue;
194+
195+
if (method_exists($notification, 'viaQueues')) {
196+
$queue = $notification->viaQueues()[$channel] ?? null;
197+
}
198+
193199
$this->bus->dispatch(
194200
(new SendQueuedNotifications($notifiable, $notification, [$channel]))
195201
->onConnection($notification->connection)
196-
->onQueue($notification->onQueues[$channel] ?? $notification->queue)
202+
->onQueue($queue)
197203
->delay($notification->delay)
198204
->through(
199205
array_merge(

0 commit comments

Comments
 (0)