-1
Next people I’m new to Laravel and I’m half crazy with that kkk Help
I am sending a Form to my Database and using a bootstrapswitch checkbox. Follow my INPUT:
<div class="col-md-12 col-xs-12">
<div class="form-group text-center ">
<input type="checkbox" name="os_tipo_id" data-bootstrap-switch
data-on-text="SELF" data-off-text="FAN COIL"
data-off-color="primary" class="os_tipo_id"
data-on-color="success" id="FANSELF">
</div>
</div>
My JS
$(".os_tipo_id").on('switchChange.bootstrapSwitch',function(e, state){var value = state ? '2' : '1';console.log(value);});
No console os Valores saem bonitinho, mas qdo vai pro banco não vai os valores que inseri no for each
IT is coming out as ON and I need to send the "os_tipo_id"
How do I make Laravel pick up the value q I’m doing on JS and send straight to the bank?
In case someone needs
My Controller Store
NOTE: my relationships are all right the problem is that q does not send the correct value. And I do not know how to do more.
I’m ultilizing this library
<script src="https://adminlte.io/themes/v3/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>