I'm creating a form where user can add or remove input fields. Every input is an array field. I have a situation where one of the field is an array inside another array. I'm not understanding how to handle this situation.
one row has 2 fields
<div id="each-row">
<input value="" class="form-control" type="text" name="size[]" placeholder="" required="">
@foreach($items as $item)
<div>
<label>
<input type="checkbox" name="colors[][color]" value="{{$item->id}}">
{{$item->name}}
</label>
</div>
@endforeach
</div>
the div is added and removed using jquery just for example I showed. I want to know how to give name for colors checkbox