@php $comments = $post->getComments()->get(); @endphp @if ($comments->isNotEmpty())
    @foreach($comments as $comment) @php $attachments = $comment->attachments()->where('role', 'attachment')->get(); @endphp
  • {{ $comment->createdBy?->name }} {{ date('Y-m-d H:i:s', strtotime($comment->created_at)) }}
    {{ $comment->content }}
    @if($attachments->isNotEmpty())
    @endif
  • @endforeach
@endif