@foreach($childs as $child)
    <option {{ ($category->id ?? '') === $child->id ? 'disabled' : '' }}
        {{ old('parent_id') == $child->id ? 'selected' : '' }}
        {{ request()->routeIs('admin.categories.edit') && $child->id == $category->parent_id ? 'selected' : '' }}
        {{-- {{ request()->routeIs('admin.pc-collects.index') && $child->pcCollect() ? 'selected' : '' }} --}}
        {{ ($category_id ?? null) === $child->id ? 'selected' : '' }} value="{{ $child->id }}">
        @for ($i = 0; $i < $spaces; $i++) &emsp; @endfor {{ $child->name ?? '' }} @if($child->children->isNotEmpty())
            @include('admin.components.category', ['childs' => $child->children, 'spaces' => $spaces + 1])
            @endif
    </option>
@endforeach
