@php $label = $label + 1; @endphp @foreach ($child_page as $child) @if (count($child->childs)) @include('core::base.pages.includes.page_child', [ 'child_page' => $child->childs, 'label' => $label, ]) @endif @endforeach