@php $entries = Statamic\Entries\Entry::query() ->where('collection', 'products') ->limit($vars['limit']) ->get(['title', 'title_ar', 'code_field', 'slug', 'assets_field']); @endphp @if ($entries->count()) @foreach ($entries as $entry) @if ($product = \App\Models\Product::find($entry->product_system_field)) @livewire( 'single-product-loop-component', [ 'entry' => $entry->toArray(), 'product' => $product, ], key('product-' . $product->id) ) @endif @endforeach @endif