@php $options = $attribute->lookup_type ? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($attribute->lookup_type) : $attribute->options()->orderBy('sort_order')->get(); $selectedOption = old($attribute->code, $value); $selectedOption = is_array($selectedOption) ? $selectedOption : explode(',', $selectedOption); @endphp @foreach ($options as $option) @endforeach