@forelse($products as $product)
@php $randNum = rand(6666,10000000); @endphp
{{$product->name}}
@if($product->discount_percentage > 0) {{translate('off')}} {{round($product->discount_percentage)}} % @endif
@php echo show_ratings($product->review->avg('rating')) @endphp

{{$product->name}}

@php $price = (@$product->stock->first()?->price ?? $product->price); @endphp @if(($product->discount_percentage) > 0) @php $discountPrice = cal_discount($product->discount_percentage,$price); @endphp {{short_amount($discountPrice)}} {{short_amount($price)}} @else {{short_amount($price)}} @endif
@empty
@include("frontend.partials.empty",['message' => 'No Product Found'])
@endforelse