@php use App\Models\AdminTask; $cellTasks = ($tasksByDate[$c['ymd']] ?? collect())->sortBy(fn (AdminTask $t) => $t->due_at->format('His')); $cellEvents = $events[$c['ymd']] ?? collect(); $total = $cellEvents->count() + $cellTasks->count(); $shown = 0; @endphp
{{ $c['day'] }} @foreach ($cellEvents as $ev) @if ($shown < 3)
{{ \Illuminate\Support\Str::limit($ev['label'], 16) }}
@php $shown++; @endphp @endif @endforeach @foreach ($cellTasks as $t) @if ($shown < 3)
{{ $t->has_time ? $t->due_at->format('H:i').' ' : '' }}{{ $t->title }}
@php $shown++; @endphp @endif @endforeach @if ($total > $shown)+{{ $total - $shown }} more@endif