Skip to content

3.9.0

Choose a tag to compare

@binaryk binaryk released this 25 Jul 10:47
· 19 commits to 3.x since this release

Unique

You can configure your scheduler to store a unique relationship with the target class for mailable by specifying:

->unique()

ie:

Scheduler::init()
    ->mailable(new InvoiceReminderMailable())
    ->target($user)
    ->unique()
    ->save();
    
Scheduler::init()
    ->mailable(new InvoiceReminderMailable())
    ->target($user)
    ->unique()
    ->save();

To migrate on this version, add a migration to add:

        Schema::table('mailator_schedulers', function (Blueprint $table) {
            $table->boolean('unique')->default(false);
        });