From 7a45ed09eaccb49efc4d29f9469d262d8754ec35 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Wed, 8 Oct 2025 11:52:16 -0400 Subject: [PATCH 1/4] Document queued notification job properties Add documentation explaining that queued notifications inherit job-related properties (tries, timeout, maxExceptions, shouldBeEncrypted, backoff, retryUntil) from the notification class to the underlying queued job. This behavior is implemented in SendQueuedNotifications but was not previously documented. --- notifications.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/notifications.md b/notifications.md index 8118ff66bf..d968a3e828 100644 --- a/notifications.md +++ b/notifications.md @@ -7,6 +7,7 @@ - [Using the Notification Facade](#using-the-notification-facade) - [Specifying Delivery Channels](#specifying-delivery-channels) - [Queueing Notifications](#queueing-notifications) + - [Customizing Queued Notification Job Properties](#customizing-queued-notification-job-properties) - [On-Demand Notifications](#on-demand-notifications) - [Mail Notifications](#mail-notifications) - [Formatting Mail Messages](#formatting-mail-messages) @@ -275,6 +276,81 @@ public function viaQueues(): array } ``` + +#### Customizing Queued Notification Job Properties + +Queued notifications are processed by Laravel's queue system using queued jobs. You may customize the behavior of the underlying queued job by defining properties on your notification class. These properties will be inherited by the queued job that sends the notification: + +```php +addMinutes(5); +} +``` + +> [!NOTE] +> For more information on these job properties and methods, please review the documentation on [queued jobs](/docs/{{version}}/queues#max-job-attempts-and-timeout) and [queued event listeners](/docs/{{version}}/events#queued-event-listeners). + #### Queued Notification Middleware From 6502b58262c98f4ad4e80a6d7ed406b64ffe131e Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Wed, 8 Oct 2025 12:00:27 -0400 Subject: [PATCH 2/4] Fix: Use ShouldBeEncrypted interface instead of property The shouldBeEncrypted behavior is applied by implementing the ShouldBeEncrypted interface on the notification class, not by setting a property directly. --- notifications.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/notifications.md b/notifications.md index d968a3e828..280ec8ce36 100644 --- a/notifications.md +++ b/notifications.md @@ -315,12 +315,25 @@ class InvoicePaid extends Notification implements ShouldQueue */ public $maxExceptions = 3; - /** - * Indicate if the notification should be encrypted. - * - * @var bool - */ - public $shouldBeEncrypted = false; + // ... +} +``` + +If you would like to ensure the privacy and integrity of a queued notification's data via [encryption](/docs/{{version}}/encryption), add the `ShouldBeEncrypted` interface to your notification class: + +```php + Date: Wed, 8 Oct 2025 12:05:00 -0400 Subject: [PATCH 3/4] Remove menu item and adjust wording --- notifications.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/notifications.md b/notifications.md index 280ec8ce36..db9bd9e82d 100644 --- a/notifications.md +++ b/notifications.md @@ -7,7 +7,6 @@ - [Using the Notification Facade](#using-the-notification-facade) - [Specifying Delivery Channels](#specifying-delivery-channels) - [Queueing Notifications](#queueing-notifications) - - [Customizing Queued Notification Job Properties](#customizing-queued-notification-job-properties) - [On-Demand Notifications](#on-demand-notifications) - [Mail Notifications](#mail-notifications) - [Formatting Mail Messages](#formatting-mail-messages) @@ -362,7 +361,7 @@ public function retryUntil(): DateTime ``` > [!NOTE] -> For more information on these job properties and methods, please review the documentation on [queued jobs](/docs/{{version}}/queues#max-job-attempts-and-timeout) and [queued event listeners](/docs/{{version}}/events#queued-event-listeners). +> For more information on these job properties and methods, please review the documentation on [queued jobs](/docs/{{version}}/queues#max-job-attempts-and-timeout). #### Queued Notification Middleware From 6d19d4e95c0c1171b7c1f209c33fb23a8965fea8 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Wed, 8 Oct 2025 12:06:54 -0400 Subject: [PATCH 4/4] Remove unnecessary sentence --- notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications.md b/notifications.md index db9bd9e82d..29de44d933 100644 --- a/notifications.md +++ b/notifications.md @@ -278,7 +278,7 @@ public function viaQueues(): array #### Customizing Queued Notification Job Properties -Queued notifications are processed by Laravel's queue system using queued jobs. You may customize the behavior of the underlying queued job by defining properties on your notification class. These properties will be inherited by the queued job that sends the notification: +You may customize the behavior of the underlying queued job by defining properties on your notification class. These properties will be inherited by the queued job that sends the notification: ```php