@@ -6,9 +6,9 @@ |
||
6 | 6 | <div> |
7 | 7 | <h6 class="my-0"><a href="{{ route('blogetc.admin.index') }}">BlogEtc Admin Home</a> |
8 | 8 | <span class="text-muted">(<?php |
9 | - use WebDevEtc\BlogEtc\Models\BlogEtcPost;use WebDevEtc\BlogEtc\Models\Category;use WebDevEtc\BlogEtc\Models\Comment;$categoryCount = BlogEtcPost::count(); |
|
9 | + use WebDevEtc\BlogEtc\Models\BlogEtcPost; use WebDevEtc\BlogEtc\Models\Category; use WebDevEtc\BlogEtc\Models\Comment; $categoryCount = BlogEtcPost::count(); |
|
10 | 10 | |
11 | - echo $categoryCount . ' ' . str_plural('Post', $categoryCount); |
|
11 | + echo $categoryCount.' '.str_plural('Post', $categoryCount); |
|
12 | 12 | |
13 | 13 | ?>)</span> |
14 | 14 | </h6> |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | @case("disabled") |
18 | 18 | <?php |
19 | - return; // not required, as we already filter for this |
|
19 | + return; // not required, as we already filter for this |
|
20 | 20 | ?> |
21 | 21 | @break |
22 | 22 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | ->orderBy('posted_at', 'desc'); |
40 | 40 | |
41 | 41 | if ($categoryID > 0) { |
42 | - $query->whereHas('categories', static function (Builder $query) use ($categoryID) { |
|
42 | + $query->whereHas('categories', static function(Builder $query) use ($categoryID) { |
|
43 | 43 | $query->where('blog_etc_post_categories.blog_etc_category_id', $categoryID); |
44 | 44 | })->get(); |
45 | 45 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up(): void |
16 | 16 | { |
17 | - Schema::table('blog_etc_comments', static function (Blueprint $table) { |
|
17 | + Schema::table('blog_etc_comments', static function(Blueprint $table) { |
|
18 | 18 | $table->string('author_email')->nullable(); |
19 | 19 | $table->string('author_website')->nullable(); |
20 | 20 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down(): void |
27 | 27 | { |
28 | - Schema::table('blog_etc_comments', static function (Blueprint $table) { |
|
28 | + Schema::table('blog_etc_comments', static function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('author_email'); |
30 | 30 | $table->dropColumn('author_website'); |
31 | 31 | }); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function up(): void |
18 | 18 | { |
19 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
19 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
20 | 20 | $table->text('short_description')->nullable(); |
21 | 21 | }); |
22 | 22 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down(): void |
28 | 28 | { |
29 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
29 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
30 | 30 | $table->dropColumn('short_description'); |
31 | 31 | }); |
32 | 32 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up(): void |
16 | 16 | { |
17 | - Schema::create('blog_etc_uploaded_photos', static function (Blueprint $table) { |
|
17 | + Schema::create('blog_etc_uploaded_photos', static function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->text('uploaded_images')->nullable(); |
20 | 20 | $table->string('image_title')->nullable(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | $table->timestamps(); |
25 | 25 | }); |
26 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
26 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
27 | 27 | $table->string('seo_title')->nullable(); |
28 | 28 | }); |
29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | Schema::dropIfExists('blog_etc_uploaded_photos'); |
37 | 37 | |
38 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
38 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
39 | 39 | $table->dropColumn('seo_title'); |
40 | 40 | }); |
41 | 41 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up(): void |
16 | 16 | { |
17 | - Schema::create('blog_etc_posts', static function (Blueprint $table) { |
|
17 | + Schema::create('blog_etc_posts', static function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->unsignedInteger('user_id')->index()->nullable(); |
20 | 20 | $table->string('slug')->unique(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $table->timestamps(); |
40 | 40 | }); |
41 | 41 | |
42 | - Schema::create('blog_etc_categories', static function (Blueprint $table) { |
|
42 | + Schema::create('blog_etc_categories', static function(Blueprint $table) { |
|
43 | 43 | $table->increments('id'); |
44 | 44 | |
45 | 45 | $table->string('category_name')->nullable(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | }); |
53 | 53 | |
54 | 54 | // linking table: |
55 | - Schema::create('blog_etc_post_categories', static function (Blueprint $table) { |
|
55 | + Schema::create('blog_etc_post_categories', static function(Blueprint $table) { |
|
56 | 56 | $table->increments('id'); |
57 | 57 | |
58 | 58 | $table->unsignedInteger('blog_etc_post_id')->index(); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $table->foreign('blog_etc_category_id')->references('id')->on('blog_etc_categories')->onDelete('cascade'); |
63 | 63 | }); |
64 | 64 | |
65 | - Schema::create('blog_etc_comments', static function (Blueprint $table) { |
|
65 | + Schema::create('blog_etc_comments', static function(Blueprint $table) { |
|
66 | 66 | $table->increments('id'); |
67 | 67 | |
68 | 68 | $table->unsignedInteger('blog_etc_post_id')->index(); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function apply(Builder $builder, Model $model) |
21 | 21 | { |
22 | - if (Helpers::hasAdminGateAccess()){ |
|
22 | + if (Helpers::hasAdminGateAccess()) { |
|
23 | 23 | return; |
24 | 24 | } |
25 | 25 |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Database\Eloquent\Model; |
4 | 4 | |
5 | -return function (?Model $user) { |
|
5 | +return function(?Model $user) { |
|
6 | 6 | return true; |
7 | 7 | }; |