@extends('front.layouts.app') @section('content') Home Shop Categories @foreach ($categories as $key => $category) @if (count($category->sub_category) > 0) {{ $category->name }} @else {{ $category->name }} @endif @if ($category->sub_category->isNotEmpty()) @foreach ($category->sub_category as $subCategory) {{ $subCategory->name }} @endforeach @endif @endforeach @if (count($brands) > 0) Brand @foreach ($brands as $brand) id, $brandsArray) ? 'checked' : '' }} class="form-check-input brand-label" type="checkbox" name="brand[]" value="{{ $brand->id }}" id="brand-{{ $brand->id }}"> {{ $brand->name }} @endforeach @endif Price {{-- Sorting Latest Price High Price Low --}} Latest Price High to Low Price Low to High @if (count($products) > 0 ) @foreach ($products as $product) @php $productImage = $product->Product_Image->first(); @endphp @if ($productImage != '') @else @endif @if ($product->qty > 0) Add To Cart @else Out of Stock @endif {{ $product->title }} {{ $product->price }} @if ($product->compare_price > 0) {{ $product->compare_price }} @endif @endforeach @else No Product Found @endif {{ $products->withQueryString()->links() }} @endsection @section('customJs') @endsection