@php use Illuminate\Support\Facades\DB; // Check if categories exist for this company $categoryCount = DB::table('categories') ->where('company_id', $global_company->company_id) ->count(); // Check if SMTP settings exist for this company $smtpCount = DB::table('smtp_configs') ->where('company_id', $global_company->company_id) ->count(); $showCategoryAlert = ($categoryCount === 0); $showSmtpAlert = ($smtpCount === 0); // The orange dot should show if either setup is missing $hasSetupNotifications = $showCategoryAlert || $showSmtpAlert; @endphp