@forelse ($categories as $category) @foreach ($category->children as $child) @endforeach @endforeach
Sl Name Slug Status Parent Action
{{ $loop->iteration }} {{ $category->name }} {{ $category->slug }}
{{ $category->status == 1 ? 'Active' : 'InActive' }}
{{ $category->parent_id ? $category->parent->name : 'N/A' }} Actions
{{ $loop->parent->iteration }}.{{ $loop->iteration }} -- {{ $child->name }} {{ $child->slug }}
{{ $child->status == 1 ? 'Active' : 'InActive' }}
{{ $child->parent->name ?? 'N/A' }} Actions