Conditions | 6 |
Paths | 32 |
Total Lines | 35 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
30 | public function build() |
||
31 | { |
||
32 | $emailsTo = str_getcsv(config('exceptions.emailExceptionsTo'), ','); |
||
33 | $ccEmails = str_getcsv(config('exceptions.emailExceptionCCto'), ','); |
||
34 | $bccEmails = str_getcsv(config('exceptions.emailExceptionBCCto'), ','); |
||
35 | $fromSender = config('exceptions.emailExceptionFrom'); |
||
36 | $subject = config('exceptions.emailExceptionSubject'); |
||
37 | |||
38 | if ($emailsTo[0] === null) { |
||
39 | $emailsTo = config('exceptions.emailExceptionsToDefault'); |
||
40 | } |
||
41 | |||
42 | if ($ccEmails[0] === null) { |
||
43 | $ccEmails = config('exceptions.emailExceptionCCtoDefault'); |
||
44 | } |
||
45 | |||
46 | if ($bccEmails[0] === null) { |
||
47 | $bccEmails = config('exceptions.emailExceptionBCCtoDefault'); |
||
48 | } |
||
49 | |||
50 | if (! $fromSender) { |
||
51 | $fromSender = config('exceptions.emailExceptionFromDefault'); |
||
52 | } |
||
53 | |||
54 | if (! $subject) { |
||
55 | $subject = config('exceptions.emailExceptionSubjectDefault'); |
||
56 | } |
||
57 | |||
58 | return $this->from($fromSender) |
||
59 | ->to($emailsTo) |
||
60 | ->cc($ccEmails) |
||
61 | ->bcc($bccEmails) |
||
62 | ->subject($subject) |
||
63 | ->view(config('exceptions.emailExceptionView')) |
||
64 | ->with('content', $this->content); |
||
65 | } |
||
67 |