{{-- Mobile navigation node: children collapse into a disclosure instead of a flyout. --}} @php($hasChildren = $item->relationLoaded('children') && $item->children->isNotEmpty())
$item->isActive(), 'text-text' => ! $item->isActive(), ])>{{ $item->label }} @if ($hasChildren) @endif
@if ($hasChildren)
@foreach ($item->children as $child) {{ $child->label }} @if ($child->relationLoaded('children') && $child->children->isNotEmpty())
@foreach ($child->children as $grandchild) {{ $grandchild->label }} @endforeach
@endif @endforeach
@endif