Laravel gallery image if product gallery image does not exists then display main image all gallery image position
<div>
@if($product->prod_gal_img_four) <!-- Display the gallery image if it exists --> <img class="ezytor-border-radius-12" src="{{ asset('uploads/product-gallery/' . $product->prod_gal_img_four) }}" alt="Gallery Image" style="width:90px; height:90px;"> @else <!-- Display the main product image if the gallery image doesn't exist --> <img class="ezytor-border-radius-12" src="{{ asset('images/' . $product->product_thumbnail) }}" alt="Main Product Image" style="width:90px; height:90px;"> @endif </div>
No comments