@php $without_label = false; if (Ui::keyset($attributes, 'without_label') != null) { $without_label = $attributes['without_label']; } if ( Ui::keyset($attributes, 'layout') == null || (Ui::keyset($attributes, 'layout') != null && $attributes['layout'] == 'h') ) { $horizental = true; $row = ' row'; $labelClass = 'col-2 col-form-label'; } else { $horizental = false; $row = ''; $labelClass = 'col-form-label'; } $list = []; if (isset($attributes['file']) && $attributes['file']) { $file = public_path($attributes['file']); $content = file_get_contents($file); $perfix = $attributes['perfix_class']; preg_match_all('/\.(.*)\:before(.*){/', $content, $output_array); if (isset($output_array[1]) && is_array($output_array[1]) && count($output_array[1]) > 0) { foreach ($output_array[1] as $v) { $v = str_replace(':', '', $v); if ($perfix != '') { $list[$perfix . ' ' . $v] = "$perfix $v"; } else { $list[$v] = $v; } } } } if (isset($attributes['required']) && $attributes['required'] === true) { $labelClass .= ' required'; } @endphp
@if (!$without_label) {{ Form::label($name, Ui::prettify(__('ui.' . Str::replaceLast('[]', '', $name))), ['class' => $labelClass]) }} @endif @if ($horizental)
@endif {{-- {{ Form::select($name, $list, $value, array_merge(['class' => 'form-select', 'data-control' => 'select2'], $attributes)) }} --}} @if ($horizental)
@endif