Skip to content

[5.8] Provide notification callback with Swift message#28535

Merged
taylorotwell merged 1 commit intolaravel:5.8from
dwightwatson:notification-callbacks
May 15, 2019
Merged

[5.8] Provide notification callback with Swift message#28535
taylorotwell merged 1 commit intolaravel:5.8from
dwightwatson:notification-callbacks

Conversation

@dwightwatson
Copy link
Copy Markdown
Contributor

This is an improved approach to #28534 which provides developers direct access to the underlying Swift message before it is fired off. The use-case for the earlier PR was to allow adding headers to the message (for tracking/analytics) but this is a more flexible solution with greater control.

In addition, this approach mimics withSwiftMessage($callback) which mailables have, so it should be familiar for people who are already using that for those reasons. As mentioned in the other PR there has been chatter about supporting custom headers for notification mail (laravel/ideas#475) and this provides that functionality.

@taylorotwell taylorotwell merged commit 5de1d43 into laravel:5.8 May 15, 2019
@Jars-of-jam-Scheduler
Copy link
Copy Markdown

Hi,

The Laravel 8.X documentation about Notifications doesn't indicate we can use the SwiftMessage callback as one'd do with Mail :-) : https://laravel.com/docs/8.x/notifications#formatting-mail-messages

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants