@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::create('menu_items', function (Blueprint $table) { |
|
11 | + Schema::create('menu_items', function(Blueprint $table) { |
|
12 | 12 | $table->increments('id'); |
13 | 13 | $table->unsignedInteger('parent_id')->nullable(); |
14 | 14 | $table->enum('type', ['collection', 'internal', 'custom', 'nolink'])->default('custom'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $table->integer('order')->default(0); |
20 | 20 | }); |
21 | 21 | |
22 | - Schema::create('menu_item_translations', function (Blueprint $table) { |
|
22 | + Schema::create('menu_item_translations', function(Blueprint $table) { |
|
23 | 23 | $table->increments('id'); |
24 | 24 | $table->integer('menu_item_id')->unsigned(); |
25 | 25 | $table->string('locale'); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::create('settings', function (Blueprint $table) { |
|
11 | + Schema::create('settings', function(Blueprint $table) { |
|
12 | 12 | $table->increments('id'); |
13 | 13 | $table->string('key')->index(); |
14 | 14 | $table->text('value'); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::create('invitations', function (Blueprint $table) { |
|
11 | + Schema::create('invitations', function(Blueprint $table) { |
|
12 | 12 | $table->increments('id'); |
13 | 13 | $table->unsignedInteger('invitee_id'); |
14 | 14 | $table->unsignedInteger('inviter_id'); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | { |
8 | 8 | public function up() |
9 | 9 | { |
10 | - Schema::create('notes', function (Blueprint $table) { |
|
10 | + Schema::create('notes', function(Blueprint $table) { |
|
11 | 11 | $table->increments('id'); |
12 | 12 | $table->boolean('published')->default(0); |
13 | 13 | $table->enum('type', ['general', 'delivery', 'payment']); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $table->timestamps(); |
19 | 19 | }); |
20 | 20 | |
21 | - Schema::create('note_translations', function (Blueprint $table) { |
|
21 | + Schema::create('note_translations', function(Blueprint $table) { |
|
22 | 22 | $table->increments('id'); |
23 | 23 | $table->integer('note_id')->unsigned(); |
24 | 24 | $table->string('locale'); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | public function up() |
10 | 10 | { |
11 | - Schema::create('jobs', function (Blueprint $table) { |
|
11 | + Schema::create('jobs', function(Blueprint $table) { |
|
12 | 12 | $table->bigIncrements('id'); |
13 | 13 | $table->string('queue'); |
14 | 14 | $table->longText('payload'); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $table->index(['queue', 'reserved_at']); |
21 | 21 | }); |
22 | 22 | |
23 | - Schema::create('failed_jobs', function (Blueprint $table) { |
|
23 | + Schema::create('failed_jobs', function(Blueprint $table) { |
|
24 | 24 | $table->bigIncrements('id'); |
25 | 25 | $table->text('connection'); |
26 | 26 | $table->text('queue'); |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | 'mediatypes' => [ |
72 | 72 | |
73 | 73 | 'default' => [ |
74 | - (object) [ |
|
74 | + (object)[ |
|
75 | 75 | 'type' => MediaType::HERO, |
76 | 76 | 'limit' => 1, |
77 | 77 | ], |
78 | - (object) [ |
|
78 | + (object)[ |
|
79 | 79 | 'type' => MediaType::THUMB, |
80 | 80 | 'limit' => 1, |
81 | 81 | ] |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | 'settingFields' => [ |
109 | 109 | // TODO: callable can be removed when we set everything up in a service provider |
110 | - 'homepage' => function () { |
|
110 | + 'homepage' => function() { |
|
111 | 111 | return \Thinktomorrow\Chief\Settings\HomepageFieldGenerator::generate(); |
112 | 112 | }, |
113 | 113 | 'contact.email' => \Thinktomorrow\Chief\Fields\Types\InputField::make('contact.email') |
@@ -33,22 +33,22 @@ |
||
33 | 33 | |
34 | 34 | if ($this->option('dev')) { |
35 | 35 | $role = 'developer'; |
36 | - } else { |
|
36 | + }else { |
|
37 | 37 | $role = 'admin'; |
38 | 38 | } |
39 | 39 | |
40 | 40 | $this->createUser($firstname, $lastname, $email, $password, [$role]); |
41 | 41 | |
42 | - $this->info($firstname.' '.$lastname. ' succesfully added as admin user.'); |
|
42 | + $this->info($firstname.' '.$lastname.' succesfully added as admin user.'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | private function settingPermissionsAndRoles() |
46 | 46 | { |
47 | - AuthorizationDefaults::permissions()->each(function ($permissionName) { |
|
47 | + AuthorizationDefaults::permissions()->each(function($permissionName) { |
|
48 | 48 | Artisan::call('chief:permission', ['name' => $permissionName]); |
49 | 49 | }); |
50 | 50 | |
51 | - AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) { |
|
51 | + AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) { |
|
52 | 52 | Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]); |
53 | 53 | }); |
54 | 54 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | if (!$this->auth->user() || !$this->authorize('update-squanto')) { |
42 | 42 | if ($request->ajax()) { |
43 | 43 | return response('Unauthorized.', 401); |
44 | - } else { |
|
44 | + }else { |
|
45 | 45 | return redirect()->guest('admin/login'); |
46 | 46 | } |
47 | 47 | } |
@@ -18,18 +18,18 @@ |
||
18 | 18 | public function handle($request, Closure $next) |
19 | 19 | { |
20 | 20 | // Verifies a valid signature and still outside expiration period |
21 | - if (! $request->hasValidSignature()) { |
|
21 | + if (!$request->hasValidSignature()) { |
|
22 | 22 | return redirect()->route('invite.expired'); |
23 | 23 | } |
24 | 24 | |
25 | - if (! $invitation = Invitation::findByToken($request->token)) { |
|
25 | + if (!$invitation = Invitation::findByToken($request->token)) { |
|
26 | 26 | return redirect()->route('invite.expired'); |
27 | 27 | } |
28 | 28 | |
29 | 29 | if (in_array($invitation->state(), [InvitationState::ACCEPTED, InvitationState::REVOKED])) { |
30 | 30 | |
31 | 31 | // We allow the user to pass if the invitee is already logged in. Otherwise the invite link cannot be reused. |
32 | - if (! auth()->guard('chief')->check() || ! auth()->guard('chief')->user()->is($invitation->invitee)) { |
|
32 | + if (!auth()->guard('chief')->check() || !auth()->guard('chief')->user()->is($invitation->invitee)) { |
|
33 | 33 | return redirect()->route('invite.expired'); |
34 | 34 | } |
35 | 35 | } |