lundi 14 février 2022

Laravel Get Values from checkbox 0 turn null

I have database like this:

enter image description here

column cek for define checkbox with code like this:

<input type="checkbox" value="" name="ada[]" @if($d->cek) checked @endif>

When its checked it will gave value '1', and when its unchecked its supposed to give value '0' but instead '0' i got null. Anyone here how should it? Thank you.




Aucun commentaire:

Enregistrer un commentaire