@extends('front.layouts.app') @section('content') @if (!empty($product->Product_Image)) @foreach ($product->Product_Image as $key => $productImage) @endforeach {{-- @else --}} @endif {{ $product->title }} @if (count($product->product_rating) > 0) @foreach ($product->product_rating as $rating) @php $rating_per = ($rating->rating*100)/5; @endphp {{ $rating->username }} {{ $rating->comment }} @endforeach @endif @if ($product->compare_price > 0) ${{ $product->compare_price }} @endif ${{ $product->price }} Discription : {!! $product->short_description !!} Quantity 1 2 3 4 5 Size @if ($product->product_size == null) @else Size : --Choose Size-- @foreach ($product_size as $size) {{ ucwords($size) }} {{--ucwords use than , --}} @endforeach @endif Colors @if ($product->product_color == null) @else Color : --Choose Color-- @foreach ($product_color as $color) {{ ucwords($color) }} {{--ucwords use than , --}} @endforeach @endif {{-- product out of stock and add to cart --}} @if ($product->qty > 0) Add to cart @else Out of Stock @endif @if (!empty($relatedProducts)) Related Products @foreach ($relatedProducts as $relatedProduct) @php $productImage = $relatedProduct->product_image->first(); @endphp @if (!empty($productImage->image)) @else @endif {{-- product out of stock and add to cart --}} @if ($relatedProduct->qty > 0) Add To Cart @else Out of Stock @endif {{-- Add To Cart --}} {{ $relatedProduct->title }} {{ $relatedProduct->price }} @if ($relatedProduct->compare_price) {{ $relatedProduct->compare_price }} @endif @endforeach @endif @endsection @section('customJs') @endsection
{{ $rating->comment }}
{!! $product->short_description !!}