@foreach ($webForm->attributes as $attribute) @php $parentAttribute = $attribute->attribute; $fieldName = $parentAttribute->entity_type . '[' . $parentAttribute->code . ']'; $validations = $parentAttribute->is_required ? 'required' : ''; @endphp {{ $parentAttribute->name }} @switch($parentAttribute->type) @case('text') @break @case('price') @break @case('email') @break @case('checkbox') @php $options = $parentAttribute->lookup_type ? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($parentAttribute->lookup_type) : $parentAttribute->options()->orderBy('sort_order')->get(); @endphp @foreach ($options as $option) @endforeach @case('file') @case('image') @break; @case('phone') @break @case('date') @break @case('datetime') @break @case('select') @case('lookup') @php $options = $parentAttribute->lookup_type ? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($parentAttribute->lookup_type) : $parentAttribute->options()->orderBy('sort_order')->get(); @endphp @foreach ($options as $option) @endforeach @break @case('multiselect') @php $options = $parentAttribute->lookup_type ? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($parentAttribute->lookup_type) : $parentAttribute->options()->orderBy('sort_order')->get(); @endphp @foreach ($options as $option) @endforeach @break @case('checkbox')
@php $options = $parentAttribute->lookup_type ? app('Webkul\Attribute\Repositories\AttributeRepository')->getLookUpOptions($parentAttribute->lookup_type) : $parentAttribute->options()->orderBy('sort_order')->get(); @endphp @foreach ($options as $option) {{ $option->name }} @endforeach

@break @case('boolean') @break @endswitch
@endforeach