@php $hasChildren ??= false; $isArrayBody = $name == "[]"; $expandable = $hasChildren && !$isArrayBody; @endphp