laravel-like-comment icon indicating copy to clipboard operation
laravel-like-comment copied to clipboard

There's any way to Get total comments count as likes ?

Open mohammedabdallah opened this issue 8 years ago • 1 comments

i want to list posts with the number of comments count

mohammedabdallah avatar Dec 06 '16 08:12 mohammedabdallah

DB::table('laravellikecomment_comments')->select(DB::raw('count(*) as comment_count, item_id'))->groupBy('item_id')->get()

This will return item_id which is your post id that you provided in @include('laravelLikeComment::comment', ['comment_item_id' => 'post_12']) and comment_count of this item_id

risul3 avatar Dec 06 '16 11:12 risul3