@foreach($listing as $k => $v)
{{ isset($v['product_title']) && $v['product_title'] ? Str::limit($v['product_title'], 120) : '' }}
@php $averageRating = DB::table('user_reviews') ->where('product_id', $v->id) ->avg('rating'); $averageRating = number_format($averageRating, 1); @endphp
  • @for ($i = 0; $i < $v->rating; $i++) @endfor
@if(isset($v['review']) && $v['review'])
{{ isset($v['review']) && $v['review'] ? strip_tags(Str::limit($v['review'], 225)) : '' }}
@endif
@endforeach