@props([ 'posts' => collect(), 'variant' => 'list', ]) @php $posts = collect($posts); @endphp @if ($posts->isNotEmpty())
@if ($variant === 'compact')
@foreach ($posts as $post) @php $tenantName = $post->tenant?->name ?: $post->tenant_key; $publishedDate = optional($post->published_at)->format('Y.m.d') ?? '-'; @endphp
{{ $post->source_board_title }} {{ $tenantName }}
{{ $post->title }}
{{ $publishedDate }}
@endforeach
@else
@endif
@endif