@php
$user = App\Models\User::where('id', $comment->user_id)->first();
@endphp
{{$user->first_name}} {{$user->last_name}}
{{$comment->created_at->diffForHumans()}}
{{$comment->comment_body}}
.
@php
$comment_reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count();
@endphp
@if($comment_reply_count <= 1)
reply
@elseif($comment_reply_count > 1)
replies
@endif
@php
$comment_replies = App\Models\CommentReply::where('comment_id', $comment->id)->orderBy('created_at', 'ASC')->get();
$all_replies = App\Models\CommentReply::where('comment_id', $comment->id)->count();
@endphp
{{$user->first_name}} {{$user->last_name}}
{{$comment->created_at->diffForHumans()}}{{$comment->comment_body}}
@php $comment_like_count = App\Models\CommentLike::where('comment_id', $comment->id)->where('feed_id', $feed->id)->where('like', 1)->count(); @endphp @if($comment_like_count > 0 && $comment_like_count < 2) {{$comment_like_count}} like @elseif($comment_like_count > 1) {{$comment_like_count}} likes @else {{$comment_like_count}} like @endif . @php $comment_reply_count = App\Models\CommentReply::where('comment_id', $comment->id)->where('feed_id', $feed->id)->count(); @endphp @if($comment_reply_count <= 1) reply @elseif($comment_reply_count > 1) replies @endif @php $comment_replies = App\Models\CommentReply::where('comment_id', $comment->id)->orderBy('created_at', 'ASC')->get(); $all_replies = App\Models\CommentReply::where('comment_id', $comment->id)->count(); @endphp{{$user->first_name}} {{$user->last_name}}
{{$comment_reply->created_at->diffForHumans()}}{{$comment_reply->comment_reply_body}}
@php $comment_reply_like_count = App\Models\CommentReplyLike::where('comment_reply_id', $comment_reply->id)->where('comment_id', $comment->id)->where('like', 1)->count(); @endphp @if($comment_reply_like_count > 0 && $comment_reply_like_count < 2) {{$comment_reply_like_count}} like @elseif($comment_reply_like_count > 1) {{$comment_reply_like_count}} likes @else {{$comment_reply_like_count}} like @endif