@extends('layouts.app') @section('title', 'Categories') @section('breadcrumb') @endsection @section('content')
All Categories
{{ $categories->count() }} categories
@forelse($categories as $index => $category) {{-- Show subcategories (children) --}} @foreach($category->children as $child) @endforeach @empty @endforelse
# Category Name Description Products Status Actions
{{ $index + 1 }}
{{-- Category color indicator --}}
{{ $category->name }}
@if($category->children->count() > 0) {{ $category->children->count() }} subcategories @endif
{{ Str::limit($category->description, 40) ?? '-' }} {{ $category->products_count }} products @if($category->is_active) Active @else Inactive @endif
@csrf @method('DELETE')
{{ $child->name }}
{{ Str::limit($child->description, 40) ?? '-' }} {{ $child->products_count }} products @if($child->is_active) Active @else Inactive @endif
@csrf @method('DELETE')

No categories yet

Add First Category
@endsection