'Different types of mailings for Laravel
I am preparing a reminder application. I have a reminder table in this application. On the other hand, I want to send special e-mails to all people in this table according to the type of reminder.
Example;
If a user has loaned a book to someone in their contact list, the borrower should receive a reminder email as the book is not returned on time.
Problem;
Mail should be prepared specifically for each category. So, when a book should have content like "Hey man you need to return the book". On the other hand, while preparing an e-mail for a loan, "When do you plan to pay this money, my friend?" It should have content like.
I've researched polymorphism to create this structure, but I'm not sure I'm researching the right thing. Any ideas on how I should build this structure on Laravel?
The current table structure is as follows;
contacts
user_id - integer, FK
name - string
email - string
phone - string
reminder
user_id - integer, FK
debtor_id - integer, FK
name - string
description - longText
type - string
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
