File tree Expand file tree Collapse file tree 3 files changed +12
-15
lines changed Expand file tree Collapse file tree 3 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 77use Carbon \Carbon ;
88use Closure ;
99use Illuminate \Database \Eloquent \Builder ;
10+ use Illuminate \Database \Eloquent \MassPrunable ;
1011use Illuminate \Database \Eloquent \Model ;
11- use Illuminate \Database \Eloquent \Prunable ;
1212use Throwable ;
1313
1414/**
3535 */
3636class Email extends Model
3737{
38- use Prunable ;
38+ use MassPrunable ;
3939
4040 protected $ casts = [
4141 'failed ' => 'boolean ' ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments