Skip to content

Commit 76389e3

Browse files
committed
wip
1 parent 6458dbe commit 76389e3

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/Email.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use Carbon\Carbon;
88
use Closure;
99
use Illuminate\Database\Eloquent\Builder;
10+
use Illuminate\Database\Eloquent\MassPrunable;
1011
use Illuminate\Database\Eloquent\Model;
11-
use Illuminate\Database\Eloquent\Prunable;
1212
use Throwable;
1313

1414
/**
@@ -35,7 +35,7 @@
3535
*/
3636
class Email extends Model
3737
{
38-
use Prunable;
38+
use MassPrunable;
3939

4040
protected $casts = [
4141
'failed' => 'boolean',

tests/TestCase.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,16 @@ public function createEmail($overwrite = [])
102102

103103
return Email::compose()
104104
->label($params['label'])
105-
->envelope(
106-
(new Envelope())
107-
->to($params['recipient'])
108-
->when($params['cc'], fn ($envelope) => $envelope->cc($params['cc']))
109-
->when($params['bcc'], fn ($envelope) => $envelope->bcc($params['bcc']))
110-
->when($params['reply_to'], fn ($envelope) => $envelope->replyTo($params['reply_to']))
111-
->when($params['from'], fn (Envelope $envelope) => $envelope->from($params['from']))
112-
->subject($params['subject'])
113-
)
114-
->content(
115-
(new Content())
116-
->view($params['view'])
117-
->with($params['variables'])
105+
->envelope(fn (Envelope $envelope) => $envelope
106+
->to($params['recipient'])
107+
->when($params['cc'], fn ($envelope) => $envelope->cc($params['cc']))
108+
->when($params['bcc'], fn ($envelope) => $envelope->bcc($params['bcc']))
109+
->when($params['reply_to'], fn ($envelope) => $envelope->replyTo($params['reply_to']))
110+
->when($params['from'], fn (Envelope $envelope) => $envelope->from($params['from']))
111+
->subject($params['subject']))
112+
->content(fn (Content $content) => $content
113+
->view($params['view'])
114+
->with($params['variables'])
118115
);
119116
}
120117

tests/test

-16 KB
Binary file not shown.

0 commit comments

Comments
 (0)