Q:

Save checkbox on/off value - Laravel

One of my form fields needs to be able to save a boolean value from a checkbox field.  Checked = true, uncheck = false.  How do I set my input field? 
<input type="checkbox" class="custom-control-input" id="user_private_account" @if($usersetting->user_private_account == true) checked @endif >

A:

Try with this,
<input type="checkbox" class="custom-control-input" id="user_private_account" @if($usersetting->user_private_account == true) checked @endif name="user_private_account">

In your Contoller
 $object->required = $request->user_private_account ?  1 : 0;

Hope this helps :)

