@php use App\Models\AdminTask; $today = now()->startOfDay(); $initials = function ($u) { if (! $u) return '—'; return strtoupper(mb_substr((string) $u->first_name, 0, 1).mb_substr((string) $u->last_name, 0, 1)) ?: 'A'; }; // Due pill renderer (matches the design's taskDuePill). $duePill = function (AdminTask $t) use ($today) { if ($t->isDone()) return ['success', ' Done']; if ($t->due_at === null) return ['neutral', 'No date']; $d = $t->due_at->copy()->startOfDay(); $time = $t->has_time ? ' '.$t->due_at->format('H:i') : ''; $clk = $t->has_time ? ' ' : ''; if ($d->lt($today)) return ['coral', ' '.$t->due_at->format('D j M').$time]; if ($d->eq($today)) return ['amber', $clk.'Today'.$time]; if ($d->eq($today->copy()->addDay())) return ['sky', $clk.'Tomorrow'.$time]; return ['neutral', $clk.$t->due_at->format('D j M').$time]; }; @endphp
Your task board and reminders — {{ now()->format('D, j F Y') }}.