@php $count_ajax_preview = 0; $length = [1]; foreach($template->sizeoptions as $opt) { $length[] = count($opt->values); } $length = max($length); @endphp @foreach ($template->sizeoptions as $option) @endforeach @if(count($template->sizeoptions)) @for ($j = 0; $j < $length; $j++) @for($i=0;$i < count($template->sizeoptions); $i++) @endfor @php $count_ajax_preview++; @endphp @endfor @endif
{{ $option->option }}
{{ $template->sizeoptions[$i]->values[$count_ajax_preview]['value'] }}