-
- public function getCommentsForPage($pageId, $commentId, $count = 20) {
- // requesting parent comments
- $query = $this->comment->getCommentsByPage($pageId, $commentId);
- return $query->paginate($count);
+
+ /**
+ * Update an existing comment.
+ * @param Comment $comment
+ * @param array $input
+ * @return mixed
+ */
+ public function update($comment, $input)
+ {
+ $comment->updated_by = user()->id;
+ $comment->update($input);
+ return $comment;
+ }
+
+ /**
+ * Delete a comment from the system.
+ * @param Comment $comment
+ * @return mixed
+ */
+ public function delete($comment)
+ {
+ return $comment->delete();