@forelse($products as $product)
@for($i = 1; $i <= 5; $i++) @endfor ({{ $product->reviews_count ?? 0 }})
{{ Str::limit($product->title, 50) }}

{{ Str::limit($product->description ?? 'No description available', 120) }}

@if($product->compare_price && $product->compare_price > $product->price) ${{ number_format($product->compare_price, 2) }} @endif

${{ number_format($product->price, 2) }}

@if($product->stock_quantity <= 0)
Out of Stock
@elseif($product->stock_quantity < 10)
Only {{ $product->stock_quantity }} left
@endif
@empty

No products found

Try adjusting your search or filter criteria

View All Products
@endforelse
@if($products->hasPages())
{{-- Previous Page Link --}} @if($products->onFirstPage()) @lang('ecommerce::ecommerce.previous') @else @lang('ecommerce::ecommerce.previous') @endif {{-- Pagination Elements --}} @php $start = max(1, $products->currentPage() - 2); $end = min($products->lastPage(), $products->currentPage() + 2); @endphp @if($start > 1) 1 @if($start > 2) ... @endif @endif @for($page = $start; $page <= $end; $page++) @if($page == $products->currentPage()) {{ $page }} @else {{ $page }} @endif @endfor @if($end < $products->lastPage()) @if($end < $products->lastPage() - 1) ... @endif {{ $products->lastPage() }} @endif {{-- Next Page Link --}} @if($products->hasMorePages()) @lang('ecommerce::ecommerce.next') @else @lang('ecommerce::ecommerce.next') @endif
Page {{ $products->currentPage() }} of {{ $products->lastPage() }} • {{ $products->total() }} total products
@endif