Notifications
@forelse(auth()->user()->notifications->take(5) as $notification) @php $isRead = !is_null($notification->read_at); $url = $notification->data['url'] ?? '#'; $separator = Str::contains($url, '?') ? '&' : '?'; $viewUrl = $url . $separator . 'notification_id=' . $notification->id; $canOpenNotification = $url !== '#'; $itemClasses = $isRead ? 'bg-white hover:bg-gray-50' : 'bg-blue-50 border border-blue-100 hover:bg-blue-100'; @endphp @if($canOpenNotification) @else @endif @empty
No notifications.
@endforelse
View All Notifications