{{-- Get subcomponent count or default to 1 if no subcomponents exist --}} @php (isset($sub->subcomponents)) ? $entryCount = (count($sub->subcomponents)) : $entryCount = 1; @endphp {{-- Wrapper for component --}}