i have a loop in my laravel project which contain checkbox and input
@foreach($s as $sh)
<tr>
<td><input type="checkbox" name="service_id[]" class="checkser" value="{{$sh->id}}"></td>
<td class="checkservice">{{$sh->name}}</td>
<td> <input type="text" class="form-control checkser inputservice" placeholder="{{trans('home.quantity')}}" name="ser_quantity[]" ></td>
<td>{{$sh->price}}</td>
</tr>
@endforeach
i need to fill text input with (1) when checkbox checked
and empty this when checkbox unchecked
i tried many method but failed to work this with next input only