@extends('frontend.layouts.master') @section('meta') @endsection @section('title','E-SHOP || PRODUCT DETAIL') @section('main-content')

{{$product_detail->title}}

    @php $rate=ceil($product_detail->getReview->avg('rate')) @endphp @for($i=1; $i<=5; $i++) @if($rate>=$i)
  • @else
  • @endif @endfor
({{$product_detail['getReview']->count()}}) Review
@php $after_discount=($product_detail->price-(($product_detail->price*$product_detail->discount)/100)); @endphp

${{number_format($after_discount,2)}}${{number_format($product_detail->price,2)}}

{!!($product_detail->summary)!!}

{{--

Available Options Color

--}} @if($product_detail->size)

Size

    @php $sizes=explode(',',$product_detail->size); // dd($sizes); @endphp @foreach($sizes as $size)
  • {{$size}}
  • @endforeach
@endif
@csrf
Quantity :

Category :{{$product_detail->cat_info['title']}}

@if($product_detail->sub_cat_info)

Sub Category :{{$product_detail->sub_cat_info['title']}}

@endif

Stock : @if($product_detail->stock>0){{$product_detail->stock}}@else {{$product_detail->stock}} @endif

{!! ($product_detail->description) !!}

Add A Review

Your email address will not be published. Required fields are marked

Your Rating *

@auth
@csrf
@error('rate') {{$message}} @enderror
@else

You need to Login OR Register

@endauth
{{-- @php $rate=0; foreach($product_detail->rate as $key=>$rate){ $rate +=$rate } @endphp --}}

{{ceil($product_detail->getReview->avg('rate'))}} (Overall)

Based on {{$product_detail->getReview->count()}} Comments
@foreach($product_detail['getReview'] as $data)
@if($data->user_info['photo']) {{$data->user_info['photo']}} @else Profile.jpg @endif
{{$data->user_info['name']}}
    @for($i=1; $i<=5; $i++) @if($data->rate>=$i)
  • @else
  • @endif @endfor
({{$data->rate}})

{{$data->review}}

@endforeach
@endsection @push('styles') @endpush @push('scripts') {{-- --}} @endpush