@foreach ($childs as $child) @if ($parent_id == $child->id) {{ str_pad('', $level, '-') }} {{ $child->auk_name }} ({{ $child->auk_path }}) @else {{ str_pad('', $level, '-') }} {{ $child->auk_name }} ({{ $child->auk_path }}) @endif @if (count($child->childs)) @include('auks.optionChildSelected', [ 'childs' => $child->childs, 'parent_id' => $auk->parent_id, 'level' => $level + 1, ]) @endif @endforeach