@php $avg_ratting = round($product->reviews->avg('ratting'), 1); $total_review = count($product->reviews); @endphp
@foreach($product->videos as $video) @endforeach @foreach($product->get_galleryImages as $image) @endforeach @foreach ($product->get_variations as $variation) @foreach($variation->get_variationDetails as $variationDetail) @if($variationDetail->image) @endif @endforeach @endforeach

{{$product->title}}

{{\App\Http\Controllers\HelperController::ratting($avg_ratting)}} {{$total_review}} reviews
@if($product->get_brand)

Brand: {{$product->get_brand->name}} | @endif Availability: @if($product->stock>0) In Stock @else Out of stock @endif

@if($product->sku)
Product SKU: {{$product->sku}}
@endif