hello im new for livewire I'm trying to get input value based on dropdown value. when i select example drop-down value TOMATO in input show its price. i done this using jQuery but I want operate it in livewire without jQuery.
Single table having only two fields.
id | vegetable_name | vegetable_price |
---|---|---|
1 | tomato | 1$ |
2 | onion | 2$ |
Drop-down view and input
<div class="form-control-wrap">
<select name="student_course" required>
@foreach ($Itemlist as $key=>$Itemlists)
<option value="{{ $Itemlists->vegetable_name}}">
{{ $Itemlists->vegetable_name}}
</option>
@endforeach
</select>
</div>
i want to show price hear
<input name="vegetable_price"><input>
my controller
public function render()
{
$Itemlist= StoreItem::get();
return view('livewire.Item_Form',compact('Itemlist'));
}