{{ trans('panel.comments') }} ({{ $comments->count() }})

@error('comment') {{ $message }} @enderror
@if(!empty(session()->has('msg')))
{{ session()->get('msg') }}
@endif @if($comments) @foreach($comments as $comment)
{{ $comment->user->full_name }} @if($comment->user->isUser() or !empty($course) and $course->checkUserHasBought($comment->user)) {{ trans('quiz.student') }} @elseif(!$comment->user->isUser() and !empty($course) and ($course->creator_id == $comment->user->id or $course->teacher_id == $comment->user->id)) {{ trans('panel.teacher') }} @elseif($comment->user->isAdmin()) {{ trans('panel.staff') }} @else {{ trans('panel.user') }} @endif
{{ dateTimeFormat($comment->created_at, 'j M Y | H:i') }}
{!! nl2br(clean($comment->comment)) !!}
@if(!empty($comment->replies) and $comment->replies->count() > 0) @foreach($comment->replies as $reply)
{{ $reply->user->full_name }} @if($reply->user->isUser() or !empty($course) and $course->checkUserHasBought($reply->user)) {{ trans('quiz.student') }} @elseif(!$reply->user->isUser() and !empty($course) and ($course->creator_id == $reply->user->id or $course->teacher_id == $reply->user->id)) {{ trans('panel.teacher') }} @elseif($reply->user->isAdmin()) {{ trans('panel.staff') }} @else {{ trans('panel.user') }} @endif
{{ dateTimeFormat($reply->created_at, 'j M Y | H:i') }}
{!! nl2br(clean($reply->comment)) !!}
@endforeach @endif
@endforeach @endif