@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $this->info("\nWelcome to the installation process of Laravel Newsletter!\n"); |
| 41 | 41 | |
| 42 | - if (! $this->confirm('Do you like to continue with the installation of Laravel Newsletter?')) { |
|
| 42 | + if (!$this->confirm('Do you like to continue with the installation of Laravel Newsletter?')) { |
|
| 43 | 43 | $this->info("\nYou stopped the installation of Laravel Newsletter\n"); |
| 44 | 44 | |
| 45 | 45 | return; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $this->line("\nInstalling.."); |
| 60 | 60 | |
| 61 | - if (! file_exists('.env')) { |
|
| 61 | + if (!file_exists('.env')) { |
|
| 62 | 62 | exec('mv .env.example .env'); |
| 63 | 63 | $this->line("\n.env file successfully created\n"); |
| 64 | 64 | } |
@@ -68,10 +68,10 @@ discard block |
||
| 68 | 68 | $this->line("\nSecret key properly generated\n"); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - $dbEnv['DB_HOST'] = $this->ask('Database host'); |
|
| 72 | - $dbEnv['DB_DATABASE'] = $this->ask('Database name'); |
|
| 73 | - $dbEnv['DB_USERNAME'] = $this->ask('Database user'); |
|
| 74 | - $dbEnv['DB_PASSWORD'] = $this->secret('Database password ("null" for no password)'); |
|
| 71 | + $dbEnv[ 'DB_HOST' ] = $this->ask('Database host'); |
|
| 72 | + $dbEnv[ 'DB_DATABASE' ] = $this->ask('Database name'); |
|
| 73 | + $dbEnv[ 'DB_USERNAME' ] = $this->ask('Database user'); |
|
| 74 | + $dbEnv[ 'DB_PASSWORD' ] = $this->secret('Database password ("null" for no password)'); |
|
| 75 | 75 | $this->updateEnvironmentFile($dbEnv); |
| 76 | 76 | |
| 77 | 77 | $this->line("Application installed.\n"); |
@@ -271,7 +271,7 @@ |
||
| 271 | 271 | ]; |
| 272 | 272 | |
| 273 | 273 | if ($key) { |
| 274 | - return $arr[$key]; |
|
| 274 | + return $arr[ $key ]; |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | return $arr; |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $check = Hash::check($request->input('old_password'), auth()->user()->password); |
| 26 | 26 | |
| 27 | - if (! $check) { |
|
| 28 | - return redirect()->back()->withErrors(['Your current password is incorrect!']); |
|
| 27 | + if (!$check) { |
|
| 28 | + return redirect()->back()->withErrors([ 'Your current password is incorrect!' ]); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | $user = $request->user(); |
@@ -63,9 +63,9 @@ |
||
| 63 | 63 | protected function create(array $data) |
| 64 | 64 | { |
| 65 | 65 | return User::create([ |
| 66 | - 'username' => $data['username'], |
|
| 67 | - 'email' => $data['email'], |
|
| 68 | - 'password' => bcrypt($data['password']), |
|
| 66 | + 'username' => $data[ 'username' ], |
|
| 67 | + 'email' => $data[ 'email' ], |
|
| 68 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 69 | 69 | ]); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct() |
| 36 | 36 | { |
| 37 | - $this->middleware('guest', ['except' => 'logout']); |
|
| 37 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function index(Request $request) |
| 20 | 20 | { |
| 21 | 21 | $templates = Template::filter($request->all()) |
| 22 | - ->paginateFilter(15, ['id', 'name']); |
|
| 22 | + ->paginateFilter(15, [ 'id', 'name' ]); |
|
| 23 | 23 | |
| 24 | 24 | return view('templates.index', compact('templates')); |
| 25 | 25 | } |
@@ -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'); |