I have a dropdown using wire:model
<div class="form-group">
<label>Menu</label>
<select wire:model="chapter_id" class="form-control @error('chapter_id') is-invalid @enderror" placeholder="Menu">
@foreach ($chapters as $chapter)
<option value="{{ $chapter->id }}">{{ $chapter->name }}</option>
@endforeach
</select>
@error('chapter_id')
<div class="invalid-feedback">{{ $message }}</div>
@enderror
</div>
It works if I do change the option (the $chapter_id assigned successfully). But, if I leave it default (not change the option), or it has only an option, the $chapter_id will not assigned $chapter_id not assigned
Can you guys help me to solve this issue?