{{ ($depth + 1) }} -   @for($i = 0; $i < $depth; $i++)              @endfor {{ $department->name }} {{ $department->departmenttype->name ?? '' }}
@php $child = false; if (! empty($department->childs)) { $depth++; $child = true; } @endphp @if (! empty($department->childs)) @foreach ($department->childs as $department) @include('organigram::departments.partials.row') @endforeach @endif