<div class="form-group col-md-12" style="display:flex;">
<label style="margin-right:10px;">Items<span class="text-danger">*</span></label>
<select style="margin-right:10px;" name="product_id" id="product_id" class="btn btn-primary" type="text">
@foreach ($listitem as $ll)
<option id="itemname" value="{{$ll->id}}">{{$ll->name}} -- {{number_format($ll->price)}}</option>
@endforeach
</select>
<label style="margin-right:10px;">Qty<span class="text-danger">*</span></label>
<input type="number" class="form-control" required name="qty">
</div>
<div class="form-group col-md-12">
<label>Price : </label>
<label for="">{{number_format($ll->price)}}</label>
</div>
How do I get the item dropdown menu id database and I will call it the id for a price where id = id from the value dropdown item name that every time I choose the dropdown item the id will change too so the price will also change depends on the id database from the drop-down menu.