@php // Assigning Full Name or N/A use App\Models\AlternativeCredential;if (Auth::user()->first_name || Auth::user()->last_name) { $full_name = Auth::user()->first_name . ' ' . Auth::user()->last_name; } else { $full_name = 'N/A'; } //Account Review Notification $accountReviewNotifications = \App\Models\User::where('account_verification', 'Under Review') ->whereNotNull('username') ->whereNotNull('email_verified_at') ->get(); $userNotification = \Auth::user()->notification()->where('is_read', 0)->orderBy('id', 'desc')->get(); //Notifications Count $adminCount = count($accountReviewNotifications); $userCount = count($userNotification->where('is_read', 0)->all()); //Checking Roles $IsSuperAdmin = Auth::user()->hasRole('Super Admin'); $IsAdministrator = Auth::user()->hasRole('Administrator'); $IsUser = Auth::user()->hasRole('User'); //Chat Indicator // $UnreadMessages = \App\Models\ChMessage::where('to_id', Auth::id())->where('seen', 0)->count(); $UnreadMessages = \App\Models\ChatMessageCount::where('receiver_id', auth()->id()) ->where('count', '>', 0) ->sum('count'); // dd($UnreadMessages); $site_logo = \App\Models\GeneralSettings::where('key', \App\Models\GeneralSettings::SITELOGO)->first() != null ? asset('') . \App\Models\GeneralSettings::where('key', \App\Models\GeneralSettings::SITELOGO)->first()->value : asset('assets/images/gc7-logo.png'); // $wallets = \App\Models\UserWallet::with('digitalAsset')->where('user_id', Auth::id())->get(); //RealNotificationCount $unreadNotificationCount = auth()->user()->notifications()->whereNull('read_at')->take(30)->count(); $alertUser = AlternativeCredential::find(Session::get('alternative_user_id')); @endphp
@include('components.upgrade-account');