Dashboard Notifications
Notifications
Stay updated with sales, reviews, and platform alerts
@if($notifications->count() > 0)
@csrf
@endif
@if(session('success'))
✓ {{ session('success') }}
@endif
@if($notifications->count() > 0)
@foreach ($notifications as $notification) @php $data = $notification->data; $isUnread = is_null($notification->read_at); $type = $data['type'] ?? 'system'; $icon = 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'; $color = 'text-blue-400'; $bg = 'bg-blue-500/10'; if($type === 'sale' || $type === 'purchase') { $icon = 'M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z'; $color = 'text-emerald-400'; $bg = 'bg-emerald-500/10'; } elseif($type === 'review') { $icon = 'M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.921-.755 1.688-1.54 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.784.57-1.838-.197-1.539-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z'; $color = 'text-amber-400'; $bg = 'bg-amber-500/10'; } elseif($type === 'ticket') { $icon = 'M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z'; $color = 'text-indigo-400'; $bg = 'bg-indigo-500/10'; } @endphp
{{ $data['title'] ?? 'System Notification' }}
{{ $notification->created_at->diffForHumans() }}
{{ $data['message'] ?? '' }}
@if(isset($data['url'])) View Details @endif
@endforeach
@if($notifications->hasPages())
{{ $notifications->links() }}
@endif @else
No notifications found
We'll notify you when something important happens!
@endif