wip
This commit is contained in:
11
resources/views/admin/components/category.blade.php
Normal file
11
resources/views/admin/components/category.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@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++)   @endfor {{ $child->name ?? '' }} @if($child->children->isNotEmpty())
|
||||
@include('admin.components.category', ['childs' => $child->children, 'spaces' => $spaces + 1])
|
||||
@endif
|
||||
</option>
|
||||
@endforeach
|
||||
@@ -0,0 +1,12 @@
|
||||
@foreach($childs as $child)
|
||||
<option value="{{ $child->id }}">
|
||||
@for ($i = 0; $i < $spaces; $i++)
|
||||
 
|
||||
@endfor
|
||||
{{ $child->name ?? '' }}
|
||||
|
||||
{{-- @if($child->childs)
|
||||
@include('admin.components.product-add-attribute-category', ['childs' => $child->childs, 'spaces' => $spaces + 1])
|
||||
@endif --}}
|
||||
</option>
|
||||
@endforeach
|
||||
Reference in New Issue
Block a user