@@ -20,9 +20,9 @@ discard block |
||
| 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 |
||
| 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 | } |