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