Skip to content

3.0.0

Choose a tag to compare

@binaryk binaryk released this 07 Jun 16:47
· 97 commits to 3.x since this release

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');
}
...