@foreach($links as $link)
  • {{$link->name}}
    @if(count($link->children) == 0) @endif
    @if(count($link->children)) @endif
  • @endforeach