@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | class LocaleMiddleware |
9 | 9 | { |
10 | - protected $languages = ['en', 'nl']; |
|
10 | + protected $languages = [ 'en', 'nl' ]; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * Handle an incoming request. |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public function handle($request, Closure $next) |
20 | 20 | { |
21 | 21 | if (Auth::check()) { |
22 | - $lang = Auth::user()->preferences['language']; |
|
22 | + $lang = Auth::user()->preferences[ 'language' ]; |
|
23 | 23 | |
24 | 24 | app()->setLocale($lang); |
25 | 25 | } |
@@ -22,9 +22,7 @@ |
||
22 | 22 | $lang = Auth::user()->preferences['language']; |
23 | 23 | |
24 | 24 | app()->setLocale($lang); |
25 | - } |
|
26 | - |
|
27 | - else { |
|
25 | + } else { |
|
28 | 26 | app()->setLocale(env('APP_LOCALE')); |
29 | 27 | } |
30 | 28 |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | |
57 | 57 | $chunk = ceil($lists->count() / 4); |
58 | 58 | |
59 | - $lists->each(function ($list) use ($chunk) { |
|
60 | - $list->subscriptions()->chunk($chunk, function ($subscriptions) { |
|
61 | - $subscriptions->each(function ($subscription) { |
|
59 | + $lists->each(function($list) use ($chunk) { |
|
60 | + $list->subscriptions()->chunk($chunk, function($subscriptions) { |
|
61 | + $subscriptions->each(function($subscription) { |
|
62 | 62 | Mail::to($subscription)->queue(new CampaignMail($subscription, $this->campaign, $this->template)); |
63 | 63 | }); |
64 | 64 | }); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'send' => 1 |
69 | 69 | ]); |
70 | 70 | |
71 | - if ($this->user->preferences['notifications']) { |
|
71 | + if ($this->user->preferences[ 'notifications' ]) { |
|
72 | 72 | Mail::to($this->user)->queue(new CampaignSendMail($this->campaign->getSubscriptions(), $this->campaign)); |
73 | 73 | } |
74 | 74 | } |