@@ -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"); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | \App\Listeners\EmailViewed::class, |
21 | 21 | ], |
22 | 22 | 'jdavidbakr\MailTracker\Events\LinkClickedEvent' => [ |
23 | - \App\Listeners\EmailClicked::class, |
|
23 | + \App\Listeners\EmailClicked::class, |
|
24 | 24 | ], |
25 | 25 | ]; |
26 | 26 |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | protected function mapWebRoutes() |
53 | 53 | { |
54 | 54 | Route::middleware('web') |
55 | - ->namespace($this->namespace) |
|
56 | - ->group(base_path('routes/web.php')); |
|
55 | + ->namespace($this->namespace) |
|
56 | + ->group(base_path('routes/web.php')); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | protected function mapApiRoutes() |
67 | 67 | { |
68 | 68 | Route::prefix('api') |
69 | - ->middleware('api') |
|
70 | - ->namespace($this->namespace) |
|
71 | - ->group(base_path('routes/api.php')); |
|
69 | + ->middleware('api') |
|
70 | + ->namespace($this->namespace) |
|
71 | + ->group(base_path('routes/api.php')); |
|
72 | 72 | } |
73 | 73 | } |
@@ -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); |