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