ldc-nature-and-respect/resources/views/bo/partials/inputs/tinyint-enum.blade.php
2023-03-24 16:53:33 +01:00

15 lines
682 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>
@foreach ($associatedModels as $associatedModel)
<option value="{{ $associatedModel['value'] }}" @if (old($name, $model->{$name}->value ?? $value ?? 1) == $associatedModel['value']) selected @endif>
{{ $associatedModel['label'] }}
</option>
@endforeach
</select>
@include('modules.input-error', [
'inputName' => $name,
'helperId' => "{{ $id }}Help",
'helper' => $helper
])