@php $today = date('Y-m-d'); @endphp @forelse($notifications as $n) @php $notificationDate = date('Y-m-d', strtotime($n->times)); $notificationTime = date('h:i A', strtotime($n->times)); $notificationFullDate = date('d M Y', strtotime($n->times)); $isPast = $notificationDate < $today; $status = $isPast ? 'past' : 'active'; $statusText = $isPast ? 'Past' : 'Active'; @endphp
{{ $statusText }} {{ $notificationFullDate }} ยท {{ $notificationTime }}

{{ $n->title }}

{{ $n->message }}
@empty

No Alerts Found

You haven't created any alerts yet. Publish your first announcement to notify students.

Create First Alert
@endforelse