Files
backend-mm/resources/views/admin/components/category.blade.php
2025-09-25 03:03:31 +05:00

12 lines
755 B
PHP

@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