@@ -22,32 +22,32 @@ |
||
22 | 22 | */ |
23 | 23 | public function boot() |
24 | 24 | { |
25 | - $this->loadViewsFrom(__DIR__ . '/../../views', 'mailersaver'); |
|
25 | + $this->loadViewsFrom(__DIR__.'/../../views', 'mailersaver'); |
|
26 | 26 | |
27 | 27 | $this->publishes([ |
28 | - __DIR__ . '/../../config/config.php' => config_path('mailersaver.php'), |
|
28 | + __DIR__.'/../../config/config.php' => config_path('mailersaver.php'), |
|
29 | 29 | ]); |
30 | 30 | |
31 | 31 | $this->publishes([ |
32 | - __DIR__ . '/../../views' => base_path('resources/views/vendor/mailersaver'), |
|
32 | + __DIR__.'/../../views' => base_path('resources/views/vendor/mailersaver'), |
|
33 | 33 | ], 'views'); |
34 | 34 | |
35 | 35 | $this->publishes([ |
36 | - __DIR__ . '/../../models/Email.php' => base_path('app/Email.php'), |
|
36 | + __DIR__.'/../../models/Email.php' => base_path('app/Email.php'), |
|
37 | 37 | ], 'models'); |
38 | 38 | |
39 | 39 | $this->publishes([ |
40 | - __DIR__ . '/../../database/migrations/' => base_path('/database/migrations') |
|
40 | + __DIR__.'/../../database/migrations/' => base_path('/database/migrations') |
|
41 | 41 | ], 'migrations'); |
42 | 42 | |
43 | 43 | $this->mergeConfigFrom( |
44 | - __DIR__ . '/../../config/config.php', 'mailersaver' |
|
44 | + __DIR__.'/../../config/config.php', 'mailersaver' |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 | |
48 | 48 | protected function registerIlluminateMailer() |
49 | 49 | { |
50 | - $this->app->singleton('mailer', function ($app) { |
|
50 | + $this->app->singleton('mailer', function($app) { |
|
51 | 51 | $config = $app->make('config')->get('mail'); |
52 | 52 | |
53 | 53 | // Once we have create the mailer instance, we will set a container instance |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | $body = empty($body) ? $this->views->make($view, $data)->render() : $body; |
57 | 57 | |
58 | 58 | $subjectTemplate = $this->model->getSubject(); |
59 | - if (! empty($subjectTemplate)) { |
|
59 | + if (!empty($subjectTemplate)) { |
|
60 | 60 | $subject = view([ |
61 | 61 | 'template' => $subjectTemplate, |
62 | - 'cache_key' => uniqid() . rand(), |
|
62 | + 'cache_key' => uniqid().rand(), |
|
63 | 63 | 'updated_at' => 0, |
64 | 64 | ], $data); |
65 | 65 | $data['subject'] = $subject->render(); |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | |
98 | 98 | $model = $this->model->initByTemplate($view); |
99 | 99 | $template = $model->where('action', $view)->first(); |
100 | - $plain = ! empty($template) ? $template->getPlain() : $plain; |
|
100 | + $plain = !empty($template) ? $template->getPlain() : $plain; |
|
101 | 101 | |
102 | - if (! empty($template)) { |
|
102 | + if (!empty($template)) { |
|
103 | 103 | $this->model = $template; |
104 | 104 | } |
105 | 105 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function addSubject($message) |
139 | 139 | { |
140 | 140 | $subject = $this->model->getSubject(); |
141 | - if (! empty($subject)) { |
|
141 | + if (!empty($subject)) { |
|
142 | 142 | $message->setSubject($subject); |
143 | 143 | } |
144 | 144 | } |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function addCc($message) |
153 | 153 | { |
154 | - $cc = $this->isOverride() ? $this->override['cc'] : (! empty($this->model) ? $this->model->getCc() : ''); |
|
155 | - if (! empty($cc)) { |
|
154 | + $cc = $this->isOverride() ? $this->override['cc'] : (!empty($this->model) ? $this->model->getCc() : ''); |
|
155 | + if (!empty($cc)) { |
|
156 | 156 | $message->setCc($cc); |
157 | 157 | } |
158 | 158 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function addBcc($message) |
167 | 167 | { |
168 | 168 | $bcc = $this->isOverride() ? $this->override['bcc'] : $this->model->getBcc(); |
169 | - if (! empty($bcc)) { |
|
169 | + if (!empty($bcc)) { |
|
170 | 170 | $message->setBcc($bcc); |
171 | 171 | } |
172 | 172 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | public function overrideTo($message) |
181 | 181 | { |
182 | 182 | $to = $this->isOverride() ? explode(',', $this->override['to']) : []; |
183 | - if (! empty($to)) { |
|
183 | + if (!empty($to)) { |
|
184 | 184 | $message->setTo($to); |
185 | 185 | } |
186 | 186 | } |