@forelse ($component->query ?? [] as $query)
@php
$query = miniCollection($query);
$inputType = $query->type == 'orderBy' ? 'order' : 'query';
@endphp
@include('cms::edit.sub.queryinput', [
'index' => $loop->index,
'queryArray' => $queries->$inputType[$query->column] ?? miniCollection([]),
'type' => $inputType,
'query' => $query,
'total' => count($component->query),
])
@empty
@include('cms::edit.sub.queryinput', [
'index' => 0,
'queryArray' => $queries->query ?? miniCollection([]),
'type' => 'query',
'query' => miniCollection([]),
'total' => 1,
])
@endforelse