@extends('front.layout.app') @section('title', 'Single Product') @section('content') {{ 'Shop' ?? '' }} @forelse($categories as $category) {{ $category->name ?: '' }} {{ $category->products_count }} Products @empty Shop @endforelse Filtered By Price $ - $ Filter {{-- $ - $ Filter --}} Top Rated Products @foreach($topRatedProducts as $product) {{ $product->name ?? 'Anoynmus' }} ${{ number_format($product->price, 2) }} @endforeach Showing 1-9 Results @if($products->count() > 0) Show Pages: @php $totalPages = $products->lastPage(); $currentPage = $products->currentPage(); @endphp 9/ 12/ 18/ 24 @endif Sort by {{-- Default sorting Sort by latest Sort by price: low to high Sort by price: high to low --}} Default sorting Sort by latest Sort by price: low to high Sort by price: high to low @include('front.partials.product-list', ['products' => $products]) {{-- @forelse ($products as $product) {{ $product->name }} @if ($product->category) {{ $product->category->name }} @else Uncategorized @endif ${{ number_format($product->price, 2) }} @empty No products found @endforelse --}} @if($products->count() > 0) @if ($products->lastPage() > 1) @foreach ($products->links()->elements as $element) @if (is_string($element)) {{ $element }} @endif @if (is_array($element)) @foreach ($element as $page => $url) {{ $page }} @endforeach @endif @endforeach @else 1 @endif @else @endif Product was successfully added to your cart Product was successfully added to your cart × Compare Products Image Name Price Description Action @endsection @section('scripts') @endsection
${{ number_format($product->price, 2) }}
Sort by
No products found