@php // Assigning Full Name or N/A 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') ->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(); $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'); @endphp
Back to Dashboard