Skip to content

Commit b295ec2

Browse files
committed
add post id to comment resource.
1 parent 7814f6c commit b295ec2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/Http/Resources/Comments.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function toArray($request)
2121
'id' => $this->id,
2222
'body' => $this->body,
2323
'user' => new UserResource($this->user),
24+
'post_id' => $this->post_id,
2425
'created_at' => $this->created_at->diffForHumans(),
2526
'updated_at' => $this->updated_at->diffForHumans(),
2627
];

0 commit comments

Comments
 (0)