webworld888/resources/views/menu/partial/itemOption.blade.php
2021-10-26 19:14:12 +09:00

11 lines
450 B
PHP

@foreach($items as $item)
@if($item->getDepth() < $maxDepth)
<option value="{{$item->getKey()}}" @if($parent == $item->getKey()) selected @endif>
@for($i = 0; $i <= $item->getDepth(); $i++){{'-'}}@endfor {{xe_trans($item->title)}}
</option>
@if($item->hasChild())
@include('menu.partial.itemOption', ['items' => $item->getChildren(), 'maxDepth' => $maxDepth])
@endif
@endif
@endforeach