@php use App\Models\PaymentGateway; $locale = $locale ?? app()->getLocale(); $heading = $data['section_heading'][$locale] ?? __('Trusted by Global Payment Networks'); // Pre-filter to gateways that have a logo — keeps the marquee loop tidy // and stops divider issues when some rows are skipped mid-loop. $gatewaysWithLogos = PaymentGateway::allCached()->filter(fn ($gw) => ! empty($gw->logo))->values(); @endphp
{{ $heading }}
@if($gatewaysWithLogos->isNotEmpty())
{{-- Render twice for a seamless CSS-driven horizontal loop --}} @for($pass = 0; $pass < 2; $pass++) @foreach($gatewaysWithLogos as $gw)
@unless($loop->last)
@endunless @endforeach {{-- Separator between the two passes so logos don't touch when looped --}} @if($pass === 0)
@endif @endfor
@endif