@foreach($attributes as $attribute) @if($attribute->attribute->at_type == App\Models\Attribute::AT_TYPE_TEXTBOX) @component('front.components.input',[ 'label'=>__($attribute->attribute->at_title), 'name'=>'attribute_'.$attribute->attribute->at_id, 'placeholder'=>NULL, 'value' => empty($item_attributes[$attribute->attribute->at_id])?NULL:$item_attributes[$attribute->attribute->at_id] ]); @endcomponent @elseif($attribute->attribute->at_type == App\Models\Attribute::AT_TYPE_SELECT) @component('front.components.select',[ 'label'=>__($attribute->attribute->at_title), 'name'=>'attribute_'.$attribute->attribute->at_id, 'options' => $attribute->attribute->values->toArray(), 'option_id' => 'atv_id', 'option_value' => 'atv_value', 'selected_value' => empty($item_attributes[$attribute->attribute->at_id])?NULL:$item_attributes[$attribute->attribute->at_id] ]) @endcomponent @endif @endforeach