@php use App\Enums\VirtualCard\CardholderType; use Illuminate\Support\Str; $isBusiness = $holder->card_type instanceof CardholderType && $holder->card_type === CardholderType::BUSINESS; $business = $holder->business; $chCountry = ($isBusiness && $business) ? $business->country : $holder->country; $idDocUrl = $holder->kyc_documents['id_document'] ?? null; $compat = isset($providers) ? $providers->filter(fn ($p) => $p->supportsCountry($chCountry)) : collect(); $owners = is_array($business?->beneficial_owners) ? $business->beneficial_owners : []; @endphp