@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | return [ |
3 | 3 | 'switcher' => true, |
4 | - /* |
|
4 | + /* |
|
5 | 5 | |-------------------------------------------------------------------------- |
6 | 6 | | List modes classes |
7 | 7 | |-------------------------------------------------------------------------- |
@@ -17,24 +17,24 @@ discard block |
||
17 | 17 | |-------------------------------------------------------------------------- |
18 | 18 | | Set middleware |
19 | 19 | */ |
20 | - 'middleware' => '', |
|
21 | - /* |
|
20 | + 'middleware' => '', |
|
21 | + /* |
|
22 | 22 | |-------------------------------------------------------------------------- |
23 | 23 | | Templates Email |
24 | 24 | |-------------------------------------------------------------------------- |
25 | 25 | | Set template emails |
26 | 26 | */ |
27 | - 'templates' => [ |
|
28 | - \agoalofalife\postman\Modes\Each::class => [ |
|
29 | - 'name_template' => 'postman::email', |
|
30 | - 'variable' => 'html' |
|
31 | - ], |
|
32 | - \agoalofalife\postman\Modes\OneToAll::class => [ |
|
33 | - 'name_template' => 'postman::email', |
|
34 | - 'variable' => 'html' |
|
35 | - ], |
|
36 | - ], |
|
37 | - /* |
|
27 | + 'templates' => [ |
|
28 | + \agoalofalife\postman\Modes\Each::class => [ |
|
29 | + 'name_template' => 'postman::email', |
|
30 | + 'variable' => 'html' |
|
31 | + ], |
|
32 | + \agoalofalife\postman\Modes\OneToAll::class => [ |
|
33 | + 'name_template' => 'postman::email', |
|
34 | + 'variable' => 'html' |
|
35 | + ], |
|
36 | + ], |
|
37 | + /* |
|
38 | 38 | |-------------------------------------------------------------------------- |
39 | 39 | | Sizes table |
40 | 40 | |-------------------------------------------------------------------------- |
@@ -16,10 +16,10 @@ |
||
16 | 16 | public function postEmail(SheduleEmail $tasks) |
17 | 17 | { |
18 | 18 | $template = config('postman.templates.'.get_class($this)); |
19 | - Mail::send($template['name_template'], [$template['variable'] => $tasks->email->text], function($message) use ($tasks) { |
|
19 | + Mail::send($template[ 'name_template' ], [ $template[ 'variable' ] => $tasks->email->text ], function($message) use ($tasks) { |
|
20 | 20 | $message->subject($tasks->email->theme); |
21 | 21 | $message->from(config('mail.from.address')); |
22 | - $message->to($tasks->email->users->map(function($value){ return $value->email;})->toArray()); |
|
22 | + $message->to($tasks->email->users->map(function($value) { return $value->email; })->toArray()); |
|
23 | 23 | }); |
24 | 24 | |
25 | 25 | // if to reached the sender |