사이트맵 닫기
@php list($gnb, $other) = $menu->first()->children->partition(function($item) { return $item->type === 'gnb'; }); @endphp
@foreach($gnb as $item)
{{ $item->name }}
@endforeach @foreach($other as $item)
{{ $item->name }}
@endforeach
{{--
@foreach($other as $item)
{{ $item->name }}
@endforeach
--}}
@foreach($menu->first()->children as $depth1)
{{ $depth1->name }}
@php list($filtered_1, $filtered_2) = $depth1->children->partition(function($item) { // return $item->type === 'submain' || $item->type === 'quick'; return $item->type === 'submain'; }); @endphp @if ($filtered_1)
@foreach ($filtered_1 as $quick) {{-- @if ($quick->name === '카톡상담')
카톡상담
@else
{{ $quick->name }}
@endif --}}
{{ $quick->name }}
@endforeach
@endif @if ($filtered_2)
@foreach ($filtered_2 as $depth2)
@if ($depth2->name === '카톡상담')
카톡상담
@else
{{ $depth2->name }}
@endif {{--
{{ $depth2->name }}
--}} @if($depth2->children->isNotEmpty())
@foreach($depth2->children as $depth3)
{{ $depth3->name }}
@if($depth3->children->isNotEmpty())
@foreach($depth3->children as $depth4)
{{ $depth4->name }}
@endforeach
@endif
@endforeach
@endif
@endforeach
@endif
@endforeach