Hot to put the updated changes from select option to an array

There is a select option of skills

              <select class="w-auto font-sans" wire:model="skill">
                @foreach($skills as $skill)
                  <option value="{{ $skill->id }}">{{ $skill->name }}</option>
                @endforeach
              </select>

the class

public function updatedSkill($id){
$sk = Skill::find($id);
???!!!!!
HOW??
$this->optionselected->push($sk);
}

in class, I want to put each updated option to an array and show under the select option that selected array

            <select class="w-auto font-sans" wire:model="skill">
                  @foreach($skills as $skill)
                    <option value="{{ $skill->id }}">{{ $skill->name }}</option>
                  @endforeach
             </select>

              @foreach($optionselected as $selected)
               <p>{{ $selected->name }}</p>
              @endforeach

You want to add entries to an array?

wire:model to a public variable in the component
When an add() button is clicked, copy the current entry into your $optionselected array

Use a plain array and add the selected skill to the array. You will need to check if the skill is already in the array.

Don’t try and use the same variable ($skill) in the loop and as the wire:model variable