so you have the column as a boolean in db? I know when I had to deal with a similar issue, I had to write a function that did this:
public function integerCheckBoxes($request)
{
$request->checkbox = $request->checkbox ? $request->checkbox : 0;
return $request
}
or in your case
public function booleanCheckBoxes($request)
{
$request->checkbox = $request->checkbox ? $request->checkbox : false;
return $request
}
All this does is see if checkbox=1, otherwise, converts , well null into false
then returns the request to the calling function
You could put this in your controller, then call it like this
public function someControllerMethod($request)
{
$request = $this->booleanCheckBoxes($request)
// your code to put it in db here
}
it all depends on how you setup your column in the DB, I made mine an integer