Passed
Push — task/comments-api ( 6d7a22 )
by Yonathan
13:12
created
database/seeds/CommentSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         $job_posters = JobPoster::all();
17 17
 
18
-        $job_posters->each(function ($job_poster) {
18
+        $job_posters->each(function($job_poster){
19 19
             $job_poster->comments()->saveMany(factory(App\Models\Comment::class, 5)->make());
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/CommentController.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function indexByJob(JobPoster $jobPoster)
22 22
     {
23
-      Log::debug($jobPoster->id);
24
-          $comments = Comment::where('job_poster_id', $jobPoster->id)->get();
25
-          return new ResourceCollection($comments);
23
+        Log::debug($jobPoster->id);
24
+            $comments = Comment::where('job_poster_id', $jobPoster->id)->get();
25
+            return new ResourceCollection($comments);
26 26
     }
27 27
 
28 28
     /**
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function store(StoreComment $request)
35 35
     {
36
-          $data = $request->validated();
37
-          $comment = new Comment();
38
-          $comment->fill($data);
39
-          $comment->save();
40
-          return new JsonResource($comment);
36
+            $data = $request->validated();
37
+            $comment = new Comment();
38
+            $comment->fill($data);
39
+            $comment->save();
40
+            return new JsonResource($comment);
41 41
     }
42 42
 }
Please login to merge, or discard this patch.