ldc-supportweb/resources/views/bo/partials/inputs/tinyint-enum.blade.php

15 lines
748 B
PHP

@if(!empty($label))
<label for="{{ $name }}" class="col-form-label"><b>{{ $label }}@if(!empty($required)) * @endif</b></label>
@endif
<select id="{{ $name }}" class="form-select" name="{{ $name }}" aria-describedby="{{ $id }}Help" @if(!empty($require))required @endif @if(!empty($disabled))disabled @endif>
@foreach ($associatedModels as $associatedModel)
<option value="{{ $associatedModel->value}}" @if (old($name, $model->{$name}->value ?? $value ?? Arr::first($associatedModels)->value) == $associatedModel->value) selected @endif>
{{ $associatedModel->label }}
</option>
@endforeach
</select>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => "{{ $id }}Help",
'helper' => $helper
])