{{ $category->id }} {!! str_repeat(' ', $level * 4) !!} {{ $category->name }}
@csrf @method('DELETE')
@csrf @method('PATCH') @php $status = $category->status ?? 'inactive'; // Default to 'inactive' if status is null @endphp
@if (isset($category->children)) @foreach ($category->children as $child) @include('inventory.category._category', ['category' => $child, 'level' => $level + 1]) @endforeach @endif