Closed gmeben closed 2 years ago
Since yesterday I've discovered a way to send email notifications that's far simpler than the method I previously discovered that involves using the EventServiceProvider
with events ands listeners.
Here's how it will work with each new notification we will create:
'mail'
to the array within the via()
method of the pertinent notification classtoMail()
method within this class as necessary$user->notify()
methodAfter discussing with the team during team time yesterday, we've decided that utilizing the event/listener pattern would be better suited for notifications as the improved modularity of events and listeners will afford better code organization. With the other pattern, notification logic (content and recipients) can muddy mutation classes or other files that aren't primarily concerned with notifications. Also, we can still leverage the toMail()
and via()
methods in notification classes with this pattern.
Problem/Why
Currently, there are no communication channels defined for sending notifications to users via email.
Goal/What
Figure out how to send notifications to users in the following ways:
Solution/How
Research how to setup notifications with email. https://laravel.com/docs/8.x/notifications
To Do / Acceptance Criteria