ldc-nature-and-respect/resources/views/bo/partials/inputs/tinyint-enum.blade.php

16 lines
682 B
PHP
Raw Normal View History

2023-03-15 10:31:55 +01:00
@if(!empty($label))
2023-03-23 09:08:28 +01:00
<label for="{{ $name }}" class="col-form-label"><b>{{ $label }}@if(!empty($required)) * @endif</b></label>
2023-03-15 10:31:55 +01:00
@endif
2023-03-22 14:04:28 +01:00
<select id="{{ $name }}" class="form-select" name="{{ $name }}" aria-describedby="{{ $id }}Help" @if(!empty($require))required @endif>
@foreach ($associatedModels as $associatedModel)
2023-03-23 09:08:28 +01:00
<option value="{{ $associatedModel['value'] }}" @if (old($name, $model->{$name}->value ?? $value ?? 1) == $associatedModel['value']) selected @endif>
2023-03-22 14:04:28 +01:00
{{ $associatedModel['label'] }}
2023-03-15 10:31:55 +01:00
</option>
@endforeach
</select>
@include('modules.input-error', [
'inputName' => $name,
2023-03-22 14:04:28 +01:00
'helperId' => "{{ $id }}Help",
'helper' => $helper
2023-03-15 10:31:55 +01:00
])