{{$product->title}}

Price:@if($product->discount_price>0 || $product->price) {{ setting('CURRENCY_CODE_MIN') ?? 'TK' }}.{{$product->price ?? $product->discount_price}} {{ setting('CURRENCY_CODE_MIN') ?? 'TK' }}.{{$product->regular_price}} @else {{ setting('CURRENCY_CODE_MIN') ?? 'TK' }}.{{$product->regular_price}} @endif

@php $hw=App\Models\wishlist::where('product_id', $product->id)->where('user_id',auth()->id())->first(); if($hw){ $color='#54c8ec'; }else{ $color='#a2acb5'; } if ($product->reviews->count() > 0) { $average_rating = $product->reviews->sum('rating') / $product->reviews->count(); } else { $average_rating = 0; } @endphp
@if ($average_rating == 0) @elseif ($average_rating > 0 && $average_rating < 1.5) @elseif ($average_rating >= 1.5 && $average_rating < 2) @elseif ($average_rating >= 2 && $average_rating < 2.5) @elseif ($average_rating >= 2.5 && $average_rating < 3) @elseif ($average_rating >= 3 && $average_rating < 3.5) @elseif ($average_rating >= 3.5 && $average_rating < 4) @elseif ($average_rating >= 4 && $average_rating < 4.5) @elseif ($average_rating >= 4.5 && $average_rating < 5) @elseif ($average_rating >= 5) @endif {{$average_rating}} rating