Skip to content

Commit

Permalink
add viaConnections to notifications doc (#8393)
Browse files Browse the repository at this point in the history
* add viaConnections to notifications doc

* formatting

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
JamesHemery and taylorotwell committed Dec 15, 2022
1 parent 8e8ff6a commit 080fcdd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions notifications.md
Expand Up @@ -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',
];
}

<a name="queued-notifications-and-database-transactions"></a>
#### Queued Notifications & Database Transactions

Expand Down

0 comments on commit 080fcdd

Please sign in to comment.