parent_id.blade.php
481 Bytes
@if ($items->where('code_id', $parent)->count())
@php $level++ @endphp
@foreach ($items->where('code_id', $parent) as $item)
<option value="{{ $item->id }}" @if ($item->id == $parent_id) selected @endif>
@if ($level) {!! str_repeat(' ', $level) !!} @endif
{{ $item->name }} ({{ $item->id }})
</option>
@include('admin.editbloks.parent_id', ['level' => $level, 'parent' => $item->id])
@endforeach
@endif