Passed
Push — main ( 3cfdb8...a45320 )
by PRATIK
10:34
created
src/Http/Requests/PageRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
         $id = $this->page->id ?? '';
42 42
 
43 43
         return [
44
-            'slug' => 'required|max:255|unique:pages,slug,' . $id,
45
-            'code' => 'required|max:255|unique:pages,slug,' . $id,
44
+            'slug' => 'required|max:255|unique:pages,slug,'.$id,
45
+            'code' => 'required|max:255|unique:pages,slug,'.$id,
46 46
             'name' => 'required|max:255',
47 47
             'meta_name' => 'nullable|max:255',
48 48
             'body' => 'nullable|max:65535',
Please login to merge, or discard this patch.
src/Traits/PostTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
     }
98 98
     public function scopeTrending($query, $limit = 12)
99 99
     {
100
-        return $query->with('author', 'tagged')->published()->get()->sortByDesc(function ($p) {
100
+        return $query->with('author', 'tagged')->published()->get()->sortByDesc(function($p) {
101 101
             return $p->weight;
102 102
         })->take($limit);
103 103
     }
Please login to merge, or discard this patch.
src/Services/PostRecommendation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $posts = Cache::get('posts', Post::with('category', 'author', 'tagged')->latest()->get());
14 14
 
15
-        return $posts->sortByDesc(function ($p) use ($post) {
15
+        return $posts->sortByDesc(function($p) use ($post) {
16 16
             $post_tags = $post->tags->pluck('name')->toArray();
17 17
             $tag_weight = $p->withAnyTag($post_tags)->exists() ? (5 / 100) * $p->weight : 0;
18 18
             $category_weight = $p->category->id == $post->category_id ? (10 / 100) * $p->weight : 0;
Please login to merge, or discard this patch.
database/migrations/2021_10_02_062840_create_posts_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('posts', function (Blueprint $table) {
16
+        Schema::create('posts', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('slug')->unique();
19 19
             $table->string('code')->unique();
Please login to merge, or discard this patch.
database/migrations/2021_10_02_080049_create_templates_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('templates', function (Blueprint $table) {
16
+        Schema::create('templates', function(Blueprint $table) {
17 17
             $table->id();
18 18
             $table->string('name');
19 19
             $table->text('template');
Please login to merge, or discard this patch.