beyondcode/laravel-comments

Comment replies - usage guide

Closed this issue · 2 comments

Could you please kindly show us how to use the reply comments??
There seems to be no documentations for it.

Comment model has to also be extended model, so I can add things like likeable.

Post->comments->first()->reply or Post->comments->first()->comments

Thank you ;)

I can't find any reference to this feature in the source code, nor in the data migration, nor in the model.

$comment = BeyondCode\Comments\Comment::first();
$comment->commentAsUser($user, "Hey there!");

BeyondCode\Comments\Comment itself implements the HasComments trait, so you comment on the comment. I'll add this example to the README in the next release.