@foreach($children as $child)
  • @php $hasChildren = $child->children->count() > 0; $link = $child->url; if ($link && !\Illuminate\Support\Str::startsWith($link, ['http://', 'https://', '/'])) { $link = url($link); } @endphp {{ $child->title }} @if($hasChildren) @include('front.partials.nav-children', ['children' => $child->children]) @endif
  • @endforeach