@php if(!isset($item->componentType)){ $item->componentType = "ComponentTextArea"; } $sub = null; if(isset($componentable)): foreach($componentable->components as $c): if($c->template_item == $item->id): $sub = $c->component; endif; endforeach; endif; @endphp