@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | { |
23 | 23 | $subscriptions = Subscription::filter($request->all()) |
24 | 24 | ->with('mailingList') |
25 | - ->paginateFilter(15, ['id', 'email', 'name', 'country', 'language', 'mailing_list_id']); |
|
25 | + ->paginateFilter(15, [ 'id', 'email', 'name', 'country', 'language', 'mailing_list_id' ]); |
|
26 | 26 | |
27 | - $lists = MailingList::get(['name', 'id'])->pluck('name', 'id'); |
|
27 | + $lists = MailingList::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
28 | 28 | |
29 | 29 | return view('subscriptions.index', compact('subscriptions', 'lists')); |
30 | 30 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function new(Subscription $subscription) |
51 | 51 | { |
52 | - $lists = MailingList::get(['name', 'id'])->pluck('name', 'id'); |
|
52 | + $lists = MailingList::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
53 | 53 | |
54 | 54 | return view('subscriptions.new', compact('subscription', 'lists')); |
55 | 55 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $this->authorize('update', $subscription); |
65 | 65 | |
66 | - $lists = MailingList::get(['name', 'id'])->pluck('name', 'id'); |
|
66 | + $lists = MailingList::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
67 | 67 | |
68 | 68 | return view('subscriptions.edit', compact('subscription', 'lists')); |
69 | 69 | } |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | |
134 | 134 | $this->authorize('view', $subscriptions->first()); |
135 | 135 | |
136 | - Excel::create('Newsletter Subscriptions', function ($excel) use ($subscriptions) { |
|
137 | - $excel->sheet('Subscriptions', function ($sheet) use ($subscriptions) { |
|
136 | + Excel::create('Newsletter Subscriptions', function($excel) use ($subscriptions) { |
|
137 | + $excel->sheet('Subscriptions', function($sheet) use ($subscriptions) { |
|
138 | 138 | $sheet->fromArray($subscriptions); |
139 | 139 | }); |
140 | 140 | })->download($method); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $lists = MailingList::filter($request->all()) |
24 | 24 | ->with('subscriptions') |
25 | - ->paginateFilter(15, ['id', 'name', 'public']); |
|
25 | + ->paginateFilter(15, [ 'id', 'name', 'public' ]); |
|
26 | 26 | |
27 | 27 | return view('lists.index', compact('lists')); |
28 | 28 | } |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | |
141 | 141 | $subscriptions = $list->subscriptions; |
142 | 142 | |
143 | - Excel::create('Subscriptions-'.$list->name, function ($excel) use ($subscriptions) { |
|
144 | - $excel->sheet('Subscriptions', function ($sheet) use ($subscriptions) { |
|
143 | + Excel::create('Subscriptions-'.$list->name, function($excel) use ($subscriptions) { |
|
144 | + $excel->sheet('Subscriptions', function($sheet) use ($subscriptions) { |
|
145 | 145 | $sheet->fromArray($subscriptions); |
146 | 146 | }); |
147 | 147 | })->export('csv'); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $campaigns = auth()->user()->campaigns() |
26 | 26 | ->filter($request->all()) |
27 | 27 | ->with('mailingLists') |
28 | - ->paginateFilter(15, ['id', 'name', 'send']); |
|
28 | + ->paginateFilter(15, [ 'id', 'name', 'send' ]); |
|
29 | 29 | |
30 | 30 | return view('campaigns.index', compact('campaigns')); |
31 | 31 | } |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $mailingLists = $campaign->getMailingList()->pluck('id')->toArray(); |
59 | 59 | } |
60 | 60 | |
61 | - $lists = MailingList::get(['name', 'id'])->pluck('name', 'id'); |
|
62 | - $templates = Template::get(['name', 'id'])->pluck('name', 'id'); |
|
61 | + $lists = MailingList::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
62 | + $templates = Template::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
63 | 63 | |
64 | 64 | return view('campaigns.new', compact('campaign', 'lists', 'templates', 'mailingLists')); |
65 | 65 | } |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | |
78 | 78 | //$campaign->load('mailingLists'); |
79 | 79 | |
80 | - $lists = MailingList::get(['name', 'id'])->pluck('name', 'id'); |
|
81 | - $templates = Template::get(['name', 'id'])->pluck('name', 'id'); |
|
80 | + $lists = MailingList::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
81 | + $templates = Template::get([ 'name', 'id' ])->pluck('name', 'id'); |
|
82 | 82 | |
83 | 83 | $mailingLists = $campaign->getMailingList()->pluck('id')->toArray(); |
84 | 84 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | notify()->flash(trans('general.woohoo'), 'success', [ |
164 | 164 | 'timer' => 3500, |
165 | - 'text' => trans('campaigns.send.success', ['name' => $campaign->name, 'subscribers' => $campaign->getSubscriptions()->count()]), |
|
165 | + 'text' => trans('campaigns.send.success', [ 'name' => $campaign->name, 'subscribers' => $campaign->getSubscriptions()->count() ]), |
|
166 | 166 | ]); |
167 | 167 | |
168 | 168 | return redirect()->route('campaigns.index'); |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | |
199 | 199 | $subscriptions = $campaign->getSubscriptions(); |
200 | 200 | |
201 | - Excel::create('Subscriptions-'.$campaign->name, function ($excel) use ($subscriptions) { |
|
202 | - $excel->sheet('Subscriptions', function ($sheet) use ($subscriptions) { |
|
201 | + Excel::create('Subscriptions-'.$campaign->name, function($excel) use ($subscriptions) { |
|
202 | + $excel->sheet('Subscriptions', function($sheet) use ($subscriptions) { |
|
203 | 203 | $sheet->fromArray($subscriptions); |
204 | 204 | }); |
205 | 205 | })->export('csv'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $relations = []; |
|
15 | + public $relations = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param $name |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - public $relations = []; |
|
15 | + public $relations = [ ]; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param $filter |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function filter($filter) |
22 | 22 | { |
23 | - return $this->where(function ($q) use ($filter) { |
|
23 | + return $this->where(function($q) use ($filter) { |
|
24 | 24 | return $q->where('email', 'LIKE', '%'.$filter.'%') |
25 | 25 | ->orWhere('name', 'LIKE', '%'.$filter.'%'); |
26 | 26 | }); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | public function generate2faKey() |
73 | 73 | { |
74 | - if (! $this->google2fa_secret) { |
|
74 | + if (!$this->google2fa_secret) { |
|
75 | 75 | $google2fa = new Google2FA(); |
76 | 76 | |
77 | 77 | $this->google2fa_secret = $google2fa->generateSecretKey(); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | parent::boot(); |
70 | 70 | |
71 | - static::creating(function ($subscription) { |
|
71 | + static::creating(function($subscription) { |
|
72 | 72 | $subscription->unsubscribe = str_random(25); |
73 | 73 | }); |
74 | 74 | } |
@@ -34,6 +34,6 @@ |
||
34 | 34 | { |
35 | 35 | return $this->markdown('emails.lists.imported') |
36 | 36 | ->subject(trans('emails.lists.imported.subject')) |
37 | - ->with(['list' => $this->list]); |
|
37 | + ->with([ 'list' => $this->list ]); |
|
38 | 38 | } |
39 | 39 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function build() |
33 | 33 | { |
34 | - return $this->markdown('emails.campaigns.send', ['campaign' => $this->campaign->name, 'subscribers' => count($this->subscriptions)]) |
|
34 | + return $this->markdown('emails.campaigns.send', [ 'campaign' => $this->campaign->name, 'subscribers' => count($this->subscriptions) ]) |
|
35 | 35 | ->subject(trans('emails.campaigns.send.subject')); |
36 | 36 | } |
37 | 37 | } |