title: How to insert boolean value "false" as 0 with DB insert?
body: <p>I receive data from a API request and it contains a value "true" or "false".  </p>
  
  <p>Before I've used PDO::PARAM_BOOL to bind the value and insert it into MySQL  </p>
  
  <p>Now I'm using Laravel and I want to know how I can insert this value as boolean value 1 or 0.  </p>
  
  <p>I've created a migration which contains </p>
  
  <pre><code>$table-&gt;boolean('businessorder');  
  </code></pre>
  
  <p>I save the data in an array and insert it in my table:  </p>
  
  <pre><code>$orderarray = [];
  
    foreach($csv as $data =&gt; $orderdata){
      $orderarray[] = [
      ...
      'businessorder' =&gt; $orderdata['is-business-order'],
      ...
      ];
  
    }
  </code></pre>
  
  <p>I receive the following error  </p>
  
  <pre><code>SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'false' for column 1  
  </code></pre>
  
  <p>The error message also shows the data to insert in the database as "false" not as 0.  </p>
  
  <p>How can I make sure it will insert 0 or 1 instead of true or false  </p>
  
  <p>When I do  </p>
  
  <pre><code>'businessorder' =&gt; (bool)$orderdata['is-business-order'],  
  </code></pre>
  
  <p>It will set everything to 1 (because (bool)'false' is true)  </p>