@if ($variant_attributes = $attributes)
@foreach ($variant_attributes as $attribute)
{{$attribute->label}}
@if ($avt != 'default')
    @php $def = null; foreach ($attribute->values as $attr) { if(in_array($attr->id, $attr_values)) { $def = $attr->id; break; } if($attr->is_default) $def = $attr->id; } @endphp @foreach ($attribute->values as $attrValue)
  • id) || (!$def && $loop->index == 0)) checked @endif> {{-- {{$attrValue->text}} --}}
  • @endforeach
@else
    @php $def = null; foreach ($attribute->values as $attr) { if(in_array($attr->id, $attr_values)) { $def = $attr->id; break; } if($attr->is_default) $def = $attr->id; } @endphp @foreach ($attribute->values as $attrValue)
  • id) || (!$def && $loop->index == 0)) checked @endif>
  • @endforeach
@endif
@endforeach
@if ($errors->has('attrs.'.$item->id))
{{$errors->first('attrs.'.$item->id)}}
@endif @endif