@php $notifications = auth()->user()?->company?->unreadNotifications() ?? (auth()->user()?->unreadNotifications() ?? []); $candidateUser = authCheck()->candidate ?? ''; $companyUser = authCheck()->company ?? ''; $unseenMessageCount = 0; if (authCheck()) { $notifications = $notifications->get(); $userType = $companyUser ? 'company' : 'candidate'; $unseenMessageCount = App\Models\Message::where('receiver_id', auth()->id())->whereNull('is_seen')->select('conversion_id')->distinct()->count('conversion_id'); } @endphp