@foreach ($offers as $index => $offer) @php $dataFromTrait = App\Http\Traits\ProductPrices::getPrice($offer->toArray()); $price = $dataFromTrait['price']; $product_price = $dataFromTrait['product_price']; $model_type = $dataFromTrait['model_type']; $productCurrency = $dataFromTrait['currency'] ?? null; if (!$price) { continue; } @endphp @livewire('card-product-component', ['index' => $index, 'price' => $price, 'product_price' => $product_price, 'model_type' => $model_type, 'productCurrency' => $productCurrency, 'cpProductArray' => $offer->toArray()], key('card-product-component-' . mt_rand(1, 1000) . $offer->id)) @endforeach
{{ $offers->links() }}