No notifications yet
You'll receive notifications for messages, bookings, and other important updates here.
@foreach($notifications as $notification)
@php
$notificationData = $notification->data;
$notificationType = class_basename($notification->type);
$isUnread = is_null($notification->read_at);
// Determine notification icon and color
$iconColor = match($notificationType) {
'NewMessageNotification' => 'text-blue-500',
'BookingRequestReceived' => 'text-green-500',
'BookingRequestAccepted' => 'text-green-500',
'BookingRequestDeclined' => 'text-red-500',
'BookingRequestReminder' => 'text-yellow-500',
'BookingAutoCancelled' => 'text-red-500',
'BookingRequestExpired' => 'text-gray-500',
'BookingCompleted' => 'text-indigo-500',
default => 'text-gray-500'
};
// Determine notification URL
$notificationUrl = '#';
if (isset($notificationData['conversation_id'])) {
$notificationUrl = route('conversations.show', $notificationData['conversation_id']);
} elseif (isset($notificationData['booking_request_id'])) {
$notificationUrl = auth()->user()->role === 'golfer'
? route('golfer.bookings.show', $notificationData['booking_request_id'])
: route('client.bookings.show', $notificationData['booking_request_id']);
}
@endphp
@if($notificationType === 'NewMessageNotification')
@else
@endif
@endforeach