Notificaciones @if($unreadCount > 0) @endif
    @forelse($notifications as $notification) @php $data = is_array($notification['data']) ? $notification['data'] : json_decode($notification['data'], true); $isUnread = is_null($notification['read_at']); $createdAt = \Carbon\Carbon::parse($notification['created_at']); @endphp
  • @if($isUnread) @else @endif

    {{ $data['message'] ?? 'Notificación' }}

    {{ $createdAt->diffForHumans() }}

    @if($isUnread) @endif
  • @empty
  • No hay notificaciones
  • @endforelse
@if(count($notifications) > 0 && $unreadCount > 0)
@endif