Skip to content

Commit bec9a15

Browse files
committed
Merge branch '3.x' of github.com:BinarCode/laravel-mailator into 3.x
2 parents ea0072c + bc70787 commit bec9a15

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Models/MailatorSchedule.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,15 @@ public function shouldSend(): bool
325325
}
326326
}
327327

328+
public function executeWhenPasses(bool $now = false): void
329+
{
330+
$this->save();
331+
332+
if ($this->shouldSend()) {
333+
$this->execute($now);
334+
}
335+
}
336+
328337
public function execute(bool $now = false): void
329338
{
330339
$this->save();

0 commit comments

Comments
 (0)