From 080fcdd3d3817f55c05f26cd721bb1346fe91635 Mon Sep 17 00:00:00 2001 From: James Hemery Date: Thu, 15 Dec 2022 16:40:47 +0100 Subject: [PATCH] add viaConnections to notifications doc (#8393) * add viaConnections to notifications doc * formatting Co-authored-by: Taylor Otwell --- notifications.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/notifications.md b/notifications.md index 16f958dda5..167ec9e7a3 100644 --- a/notifications.md +++ b/notifications.md @@ -224,6 +224,21 @@ If you would like to specify a specific queue that should be used for each notif ]; } +Likewise, if you would like to specify a specific queue connection that should be used for each notification channel supported by the notification, you may define a `viaConnections` method on your notification. This method should return an array of channel name / queue connection name pairs: + + /** + * Determine which connections should be used for each notification channel. + * + * @return array + */ + public function viaConnections() + { + return [ + 'mail' => 'redis', + 'database' => 'sync', + ]; + } + #### Queued Notifications & Database Transactions