3.0.0
Drop
- Drop support for php7.4
Added
You can link the scheduler with any entity like this:
MailatorSchedule::init('Invoice reminder.')
->mailable(new InvoiceReminderMailable())
->days(1)
->target($invoice)
->save();and then in the Invoice model you can get all emails related to it:
// app/Models/Invoice.php
public function schedulers()
{
return $this->morphMany(Binarcode\LaravelMailator\Models\MailatorSchedule::class, 'targetable');
}
...