@php $level = isset($level) ? $level : 0; $comments = isset($comments) ? $comments : []; $dateFormat = config('app.locale') == 'vi' ? 'H:i - d/m/Y' : 'h:i - M d, Y'; @endphp @if (count($comments)) @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->htmlMessage() }}
@include($_template . 'comment-list', ['comments' => $comment->publishChildren, 'level' => $level + 1])
@endif