#47 - Adds functionality to display child comments. Also has some code towards the reply functionality.

This commit is contained in:
Abijeet
2017-04-27 02:35:29 +05:30
parent d447355a61
commit c3ea0d333e
12 changed files with 127 additions and 34 deletions

View File

@ -85,7 +85,11 @@ class CommentController extends Controller
$this->checkOwnablePermission('page-view', $page);
$comments = $this->commentRepo->getCommentsForPage($pageId, $commentId);
if (empty($commentId)) {
// requesting for parent level comments, send the total count as well.
$totalComments = $this->commentRepo->getCommentCount($pageId);
return response()->json(array('success' => true, 'comments'=> $comments, 'total' => $totalComments));
}
return response()->json(array('success' => true, 'comments'=> $comments));
}
}