@php $countChild = $children ? count($list = $children->getComponents()) : 0; if (!$countChild) { $list = []; } $hasSidebar = false; foreach ($list as $item) { if ($item->data->is_sidebar) { $hasSidebar = true; } } @endphp