@php
if(array_has($sub, 'json_options')) {
$options = json_decode($sub->json_options, true);
} else {
$options['type'] = 'testimonial';
}
@endphp
@php
/**
* This was returning 0 instead of 1.
**/
(isset($sub->subcomponents)) ? $entryCount = (count($sub->subcomponents)) : $entryCount = 1;
@endphp
{{-- ASPECT RATIO --}}
@php
if( old("components.".$item->id.".values.enable_aspect_ratio", $sub->enable_aspect_ratio ?? null) ){
$on = 'checked';
$off = '';
} else {
$on = '';
$off = 'checked';
}
$check = old("components.".$item->id.".values.aspect_ratio", $sub->aspect_ratio ?? null);
$ratios = getAspectRatios();
@endphp
{{-- SUBCOMPONENTS --}}
@for($i = 0; $i < $entryCount; $i++)
@include('componentcarousel::item.editor',
[
'i' => $i,
'itemID' => $item->id
]
)
@endfor
@if(isset($post->id))
@endif