We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9231ef commit 33cd16bCopy full SHA for 33cd16b
backend/app/Entity/Comment.php
@@ -75,4 +75,9 @@ public function edit(string $text): void
75
76
$this->body = $text;
77
}
78
+
79
+ public function getTweetId(): int
80
+ {
81
+ return $this->tweet_id;
82
+ }
83
backend/app/Http/Presenter/CommentAsArrayPresenter.php
@@ -22,6 +22,7 @@ public function present(Comment $comment): array
22
'id' => $comment->getId(),
23
'body' => $comment->getBody(),
24
'author_id' => $comment->getAuthorId(),
25
+ 'tweet_id' => $comment->getTweetId(),
26
'created_at' => $comment->getCreatedAt()->toDateTimeString(),
27
'updated_at' => $comment->getUpdatedAt() ? $comment->getUpdatedAt()->toDateTimeString() : null,
28
'author' => $this->userArrayPresenter->present($comment->author)
0 commit comments