@php $level = isset($level) ? $level : 0; $comments = isset($comments) ? $comments : []; @endphp @if (count($comments))

{{count($comments)}} Nhận xét

@foreach ($comments as $comment) @php $isFirst = !$level && !$loop->index; $avatar = $comment->author_id && ($author = get_model_data('user', $comment->author_id)) ? get_user_avatar($author->avatar) : asset('static/images/default/avatar.png'); @endphp
  • {{$comment->author_name}}

    {{$comment->author_name}}

    @if ($level < 4) @endif

    {{$comment->htmlMessage()}}

  • @if ($comment->publishChildren && count($comment->publishChildren)) @include($_template.'comment-list', [ 'comments' => $comment->publishChildren, 'level' => $level + 1 ]) @endif @endforeach @endif