@@ -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 | } |
@@ -45,9 +45,9 @@ |
||
45 | 45 | '%email%' => $this->subscription->email, |
46 | 46 | '%name%' => $this->subscription->name, |
47 | 47 | '%country%' => countries($this->subscription->country), |
48 | - '%unsubscribe_link%' => route('subscriptions.preunsubscribe', [$this->subscription->email, $this->subscription->unsubscribe]) |
|
48 | + '%unsubscribe_link%' => route('subscriptions.preunsubscribe', [ $this->subscription->email, $this->subscription->unsubscribe ]) |
|
49 | 49 | ], $this->template->content) |
50 | - ])->withSwiftMessage(function ($message) { |
|
50 | + ])->withSwiftMessage(function($message) { |
|
51 | 51 | $headers = $message->getHeaders(); |
52 | 52 | $headers->addTextHeader('X-Campaign-ID', $this->campaign->id); |
53 | 53 | }); |
@@ -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 |