@php $status = $comment->status ?? 'active'; $badgeClass = $status === 'active' ? 'bg-success' : ($status === 'pending' ? 'bg-warning text-dark' : 'bg-secondary'); $canEdit = auth()->check() && (auth()->id() === $comment->user_id || Gate::allows('manage-comment', [$comment, $comment->commentable])); $canDelete = auth()->check() && (auth()->id() === $comment->user_id || Gate::allows('manage-comment', [$comment, $comment->commentable])); @endphp
{{ $commentUser?->name }}
@if($canEdit)-
{{ __('labels.edit') }}
@endif
@if($canDelete)
-
{{ __('labels.delete') }}
@endif
{!! nl2br(e($comment->content)) !!}