orderBy('created_at', 'desc')->get(); // foreach ($customers as $customer) { // $activePassportCount = OrderedPassport::where('iam_principal_xid', $customer->id) // ->where('is_active', 1) // Assuming 'status' field indicates the status of the passport // ->count(); // $customer->activePassportCount = $activePassportCount; // } return view('Admin.pages.manage_users.manage_customer.customer', compact('customers')); } catch (Exception $e) { Log::error("Manage Voucher Page Not Load " . $e->getMessage()); return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); } } }