Blame view

resources/views/admin/part/parents.blade.php 460 Bytes
6eff6bf11   Андрей Ларионов   Админка сайта кат...
1
2
3
4
5
6
7
8
9
10
  @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 }}
          </option>
          @include('admin.part.parents', ['level' => $level, 'parent' => $item->id])
      @endforeach
  @endif