Get the selected option value

I am trying to get the value of the selected option but I get just null.

Livewire blade:

@foreach($statuses as $id => $status)
<option value="{{ $id }}" {{ (isset($ticket) && $ticket->status ? $ticket->status_id->id : old(‘status’)) == $id ? ‘selected’ : ‘’ }}>{{ $status }}

Livewire backend:
public $status;

and then

I just select one option. I don’t need multiple. What can be the problem?

1 Like

You should use wire:model=“status” and use array.