parent_id.blade.php 755 Bytes
@if ($items->where('parent_id', $parent)->count())
    @php $level++ @endphp
    @foreach ($items->where('parent_id', $parent) as $item)
        <option value="{{ $item->id }}" @if ($item->id == $parent_id) selected @endif>
            @if ($level) {!! str_repeat('&nbsp;&nbsp;&nbsp;', $level) !!}  @endif
            {{ $item->name }}
                @switch ($item->is_bd)
                    @case (0) (База данных) @break
                    @case (1) (База резюме) @break
                    @case (2) (Везде) @break
                    @default (Везде) @break
                @endswitch
        </option>
        @include('admin.job_titles.parent_id', ['level' => $level, 'parent' => $item->id])
    @endforeach
@endif