0

I have checkbox on my image, and there is a checkbox on each images, these images are coming from database, i want if i checked(click) the checkbox, the product must be enabled(ACTIVE = 1) in the data base, means in database ACTIVE field is there,defaultly this field is 0.

So after clicking the checkbox the value must be change 0 to 1 in data base and after unchecked it must be set the 0 in database.

<div class="thumbnail">
  <img src="{{$product->img}}">
  <div class="caption">
    <p>
      <a href="#" id="modal_product" class="btn btn-info btn-xs" role="button" data-toggle="modal" data-target="#myModal{{$product->id}}">Edit</a>
      <input type="checkbox" name="tag_1" id="tag_1" value="yes" >Visible
    </p>
  </div>
</div>
Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
bhatt
  • 135
  • 1
  • 14

0 Answers0