@yield('page-title', 'Dashboard')
{{-- Notification bell --}}
@php $unreadCount = auth()->user()->unreadNotifications()->count(); @endphp
-
Notifications
@if($unreadCount > 0)
@endif
@forelse(auth()->user()->notifications()->latest()->limit(10)->get() as $notif)
@php
$notifUrl = '#';
if (!empty($notif->data['lead_id'])) {
$notifUrl = route('admin.leads.show', $notif->data['lead_id']);
} elseif (!empty($notif->data['url'])) {
$notifUrl = $notif->data['url'];
}
@endphp
-
{{ $notif->data['message'] ?? 'Notification' }}
{{ $notif->created_at->diffForHumans() }}
@empty
- No notifications yet.
@endforelse
-
{{ auth()->user()->name }}
{{ auth()->user()->email }}
{{ ucfirst(auth()->user()->role) }}
-
My Profile
-
{{-- Main Content --}}
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@yield('content')
{{-- SweetAlert2 --}}
@stack('scripts')