@extends('layouts.home') @section('content') Product Categories Browse products by category Showing {{ $categories->count() }} categories @forelse ($categories as $index => $category) @if ($category->icon) @else @endif {{ $category->name }} @if ($category->description) {{ Str::limit($category->description, 50, '...') }} @endif @php $productCount = $category->products ? $category->products->count() : 0; @endphp {{ $productCount }} {{ $productCount == 1 ? 'Product' : 'Products' }} View Products @empty No categories found Categories will appear here once they are added View All Products @endforelse @endsection
Browse products by category
Categories will appear here once they are added