Skip to content

Commit e5e7540

Browse files
committed
Tags
1 parent b35960a commit e5e7540

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

database/migrations/create_mailator_tables.php.stub

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class CreateMailatorTables extends Migration
1414
$table->bigIncrements('id');
1515

1616
$table->string('name', 100)->nullable();
17+
$table->string('tags', 100)->nullable();
1718
$table->text('mailable_class')->nullable();
1819
$table->nullableMorphs('targetable');
1920
$table->text('action')->nullable();

src/Models/MailatorSchedule.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
/**
2222
* Class MailatorSchedule.
2323
*
24+
* @property string tag
25+
* @property string name
2426
* @property string targetable_type
2527
* @property string targetable_id
2628
* @property string mailable_class
@@ -361,4 +363,15 @@ public function actionClass(string $action): self
361363

362364
return $this;
363365
}
366+
367+
public function tag(string|array $tag): self
368+
{
369+
if (is_array($tag)) {
370+
$tag = implode(',', $tag);
371+
}
372+
373+
$this->tag = $tag;
374+
375+
return $this;
376+
}
364377
}

0 commit comments

Comments
 (0)