Sign in
to join the discussion on this article.
@endauth
@if($commentsCollection->isEmpty())
No comments yet
Start the conversation if you have feedback, context, or a question about this update.
@else
@foreach($commentsCollection as $comment)
@php
$commentUser = $comment->user;
$displayName = $commentUser?->name ?: $commentUser?->username ?: $comment->author_name ?: 'Former member';
$username = $commentUser?->username;
$profileUrl = $username ? '/@' . strtolower((string) $username) : null;
$canDelete = $viewer && ((int) $viewer->id === (int) $comment->user_id || (int) $viewer->id === (int) $article->author_id || $viewer->isAdmin() || $viewer->isModerator());
@endphp
@if($commentUser)
 $commentUser->id, $commentUser->profile?->avatar_hash, 64) }})
@else
{{ \Illuminate\Support\Str::upper(\Illuminate\Support\Str::substr($displayName, 0, 1)) }}
@endif
{{ optional($comment->created_at)->diffForHumans() ?? 'Unknown time' }}
@if($canDelete)
@endif
{!! $comment->getDisplayHtml() !!}
@endforeach
@endif