@php $name = $id = 'fillYear'; $label = isset($element['label']) ? $element['label'] : 'Year:'; $class = 'form-control custom-select2'; if (isset($element['attributes']['class'])) { $class .= ' ' . $element['attributes']['class']; } $attributes = ['id' => $id, 'class' => $class,'placeholder' => 'Select year']; if (isset($element['attributes'])) { $attributes = array_merge($attributes, $element['attributes']); } $options = $yearsOption = array_combine(range(date("Y"), 2011), range(date("Y"), 2011)); if (isset($element['options'])) { $options = $element['options']; } $defaultValue = isset($element['defaultValue']) ? $element['defaultValue'] : ''; $col = isset($element['col']) ? "col-xs-" . $element['col'] : 'col-xs-2'; @endphp