ekosistem basis data tambah field enum

This commit is contained in:
2026-05-06 15:51:59 +07:00
parent 9605ae7502
commit 61d8c41c63
9 changed files with 209 additions and 10 deletions
@@ -47,6 +47,12 @@
@endforeach
@endif
</select>
@elseif($k->tipe == 'enum')
<select class="form-select tipe-fk @error($k->kolom) is-invalid @enderror" id="add-data-{{ $k->kolom }}" name="{{ $k->kolom }}">
@foreach($k->enum_opsi as $opsi)
<option value="{{ $opsi['value'] }}" {{ old($k->kolom) == $opsi['value'] ? 'selected' : '' }}>{{ $opsi['label'] }}</option>
@endforeach
</select>
@else
<input type="text" class="form-control @error($k->kolom) is-invalid @enderror" id="add-data-{{ $k->kolom }}"
name="{{ $k->kolom }}" placeholder="Cth: {{ $k->label }}" value="{{ old($k->kolom) }}" />