Skip to content

Commit 51173fe

Browse files
committed
Do not send email when models are deleted
1 parent 3851bfc commit 51173fe

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/Mail/ArticleApprovedEmail.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
final class ArticleApprovedEmail extends Mailable
99
{
10+
public bool $deleteWhenMissingModels = true;
11+
1012
public function __construct(public Article $article) {}
1113

1214
public function build()

app/Mail/NewReplyEmail.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
final class NewReplyEmail extends Mailable
1212
{
13+
public bool $deleteWhenMissingModels = true;
14+
1315
public Thread $thread;
1416

1517
public function __construct(

app/Mail/ThreadDeletedEmail.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
final class ThreadDeletedEmail extends Mailable
99
{
10+
public bool $deleteWhenMissingModels = true;
11+
1012
public function __construct(public Thread $thread, public string $reason) {}
1113

1214
public function build()

0 commit comments

Comments
 (0)