@php $name = $id = 'fillSectionId'; $label = isset($element['label']) ? $element['label'].'*' : 'Section:'; $class = 'form-control custom-select2'; if (isset($element['attributes']['class'])) { $class .= ' ' . $element['attributes']['class']; } $attributes = ['id' => $id, 'class' => $class,'placeholder' => 'Please select section']; if (isset($element['attributes'])) { $attributes = array_merge($attributes, $element['attributes']); } $data = []; $data = DB::table('eims_section') ->select('name', 'id') ->whereNull('deleted_at') ->where('status',1) ->pluck('name', 'id'); $options = $data; if (isset($element['options'])) { $options = $element['options']; } $defaultValue = isset($element['defaultValue']) ? $element['defaultValue'] : ''; @endphp