@if(count($allproducts)>0) @isset($allproducts) @foreach ( $allproducts as $product) @if($loop->index < $productCount)
@php $category = App\Category::with('simpleproducts')->where('id','=',$product->category_id)->first(); $cat_slug = str_slug($category->title, '-', app()->getLocale()); $subcategory =App\Subcategory::with('simpleproducts')->where('id','=',$product->subcategory_id)->first(); $subcat_slug = str_slug($subcategory->title, '-', app()->getLocale()); @endphp @if($product->thumbnail != '' ) @if($product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$product->thumbnail))  {{ ucfirst($product->product_name) }} @else  {{ ucfirst($product->product_name) }} @endif @else No Image @endif
@endif @endforeach @endisset @endif
@if(count($allproducts)>0) @isset($allproducts) @foreach ($allproducts as $product) @if($loop->index < $productCount)
@php $category = App\Category::with('simpleproducts')->where('id','=',$product->category_id)->first(); $cat_slug = str_slug($category->title, '-', app()->getLocale()); $subcategory =App\Subcategory::with('simpleproducts')->where('id','=',$product->subcategory_id)->first(); $subcat_slug = str_slug($subcategory->title, '-', app()->getLocale()); @endphp @if($product->thumbnail != '' ) @if($product->thumbnail != '' && file_exists(public_path().'/images/simple_products/'.$product->thumbnail))  {{ ucfirst($product->product_name) }} @else  {{ ucfirst($product->product_name) }} @endif @else No Image @endif
@endif @endforeach @endisset @endif