@php use App\Models\Product\ProductType; $agency = auth()->user()?->agency; $allProductTypes = ProductType::where('is_active', true) ->orderBy('sort_order') ->get(); $agencyActiveProductTypeIds = $agency ? $agency->productTypes() ->where('agency_product_types.is_active', true) ->pluck('product_types.id') ->toArray() : []; $pendingResCount = \App\Models\Reservation\Reservation::byAgency(auth()->user()->currentAgencyId() ?? 0) ->byStatus('pending') ->count(); @endphp