-1
Hello, all right?
I have the following form:
<div class="form-group">
<label for="stock_options">Opções de Estoque</label>
@foreach($stockOptions as $stockOption)
<div class="form-check col-md-3">
<input class="form-check-input" type="checkbox" name="stockOption" value="{{$stockOption->stock_option_id}}">
<label class="form-check-label" for="stockOption">{{$stockOption->name}}</label>
<input type="text" class="form-control" name="stockOptionQuantity" placeholder="Quantidade">
</div>
@endforeach
</div>
This is within a registration of the product where I am trying to register the stock options, it would select the stock options and put how much is necessary of that option to make the product. At the moment I’m not sure how to get only the "Inputs" selected and the amount of them to be caught in the create.
Oh, thank you very much, it worked out that way. One thing I learned at work is to put the name of the inputs as "stockAction[]" and when I get the values they are inside an array in the controller, half gambis but funnel
– Jessé Satlei