@forelse($briefComments as $comment)
@php
$authorName = $comment->employer?->user?->name ?? 'Employe';
$commentInitials = collect(explode(' ', $authorName))->filter()->take(2)->map(fn ($w) => mb_strtoupper(mb_substr($w, 0, 1)))->implode('') ?: 'E';
@endphp
{{ $commentInitials }}
{{ $authorName }}
@if($comment->comment)
{{ $comment->comment }}
@endif
@if($comment->images && $comment->images->isNotEmpty())
@foreach($comment->images as $image)
@php $imgUrl = route('employer-briefs.comments.images.show', ['brief' => $brief, 'image' => $image]); @endphp
@endforeach
@endif
{{ $comment->created_at?->diffForHumans() }}
@empty
Aucun commentaire. Soyez le premier a reagir.
@endforelse
Commentaires
{{ $briefComments->count() }} publication(s)
{{ $authorName }}
@if($comment->comment){{ $comment->comment }}
@endif @if($comment->images && $comment->images->isNotEmpty()){{ $comment->created_at?->diffForHumans() }}
Aucun commentaire. Soyez le premier a reagir.
@endforelse