@php /** * @var \Botble\Shortcode\Compilers\Shortcode $shortcode * @var \Illuminate\Support\Collection $vendors */ $perRow = (int) ($shortcode->items_per_row ?: 4); $perRow = max(1, min(6, $perRow)); $colClass = match ($perRow) { 1 => 'col-12', 2 => 'col-md-6 col-12', 3 => 'col-lg-4 col-md-6 col-12', 4 => 'col-xl-3 col-lg-4 col-md-6 col-12', 5 => 'col-xl-2 col-lg-3 col-md-4 col-6', 6 => 'col-xl-2 col-lg-3 col-md-4 col-6', default => 'col-xl-3 col-lg-4 col-md-6 col-12', }; @endphp
@foreach ($vendors as $vendor)
@endforeach