Blame view
resources/views/part/categories_menu.blade.php
704 Bytes
0cbcbfbe0 Дополнительные ка... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
@if ($items->where('parent_id', $parent)->count()) @php $level++ @endphp <? $array = $items->where('parent_id', $parent) ?> @foreach ($array as $item) @if($level) <li><a href="{{ route('catalog_detail', $item->id)}}">{{ $item->name }}</a></li> @else </ul> <button class="catalog-accordion modal-cat-acc-but js_catalog_accordion">{{$item->name}}</button> <ul class="catalog-accordion-panel modal-cat-panel"> @endif <? /*if($item == end($array)) {?> </ul> <? $level = -1; }*/?> @include('part.categories', ['level' => $level, 'parent' => $item->id]) @endforeach @endif |