@if($notifications->contains(fn ($notification) => $notification->read_at === null))
@csrf
@endif
@forelse($notifications as $notification)

{{ $notification->data['title'] ?? 'Notification' }}

{{ $notification->data['body'] ?? '' }}

{{ $notification->created_at->diffForHumans() }}

@if(isset($notification->data['url']))
@csrf
@elseif(! $notification->read_at)
@csrf
@endif
@empty

You're all caught up.

@endforelse
{{ $notifications->links() }}