New category
@if ($tops->isEmpty()) Add your first category @else
@foreach ($tops as $top) @foreach ([$top, ...($children[$top->id] ?? collect())->all()] as $cat) @php($sub = $cat->parent_id !== null) ! $sub])> @endforeach @endforeach
CategoryProductsUnitGST / HSNCommissionStatus
@if (! $sub) @if ($cat->imageUrl())@else@endif @endif ! $sub, 'ps-4' => $sub])>@if ($sub)↳@endif{{ $cat->name }}
/{{ $cat->slug }}
{{ $sub ? '' : ($counts[$cat->slug] ?? 0) }} {{ $cat->default_uom }} {{ $cat->gst_rate !== null ? rtrim(rtrim($cat->gst_rate, '0'), '.').'%' : '—' }}{{ $cat->hsn ? ' · '.$cat->hsn : '' }} @if ($cat->commission_type){{ $cat->commission_type === 'percent' ? rtrim(rtrim($cat->commission_value, '0'), '.').'%' : inr($cat->commission_value).' / unit' }}@elseDefault@endif @if ($cat->is_active)Active@elseOff@endif @unless ($sub)+ Sub-category@endunless Edit
@endif