@props([ 'maxNotifications' => 5, 'showMarkAllRead' => true, 'showViewAll' => true, ]) @php $user = auth()->check() ? auth()->user() : null; $notifications = $user ? $user->notifications()->limit($maxNotifications)->get() : collect(); $unreadCount = $user ? $user->unreadNotifications()->count() : 0; @endphp @if(!$user) @else
{{ Str::limit($notification->data['message'] ?? '', 100) }}
{{ $notification->created_at->diffForHumans() }}No notifications