title: Laravel - SQL - SQLSTATE[01000]: Warning: 1265 Data truncated for column 'nsfw' at row 1
body: <p>I'm trying to safe some data in my database and get the following error:</p>
  
  <p>SQLSTATE[01000]: Warning: 1265 Data truncated for column 'nsfw' at row 1</p>
  
  <p>The nsfw column has a 0 as a standart value. Thats my table:</p>
  
  <p><a href="https://i.stack.imgur.com/R3YAr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/R3YAr.png" alt="phpmyadminscreenshot"></a></p>
  
  <p>The nsfw column is also in the models <code>$fillable</code> array. </p>
  
  <p>I want to detect if a checkbox is checked. If it is checked, nsfw should be 1. If it's not, nsfw should be 0. </p>
  
  <p>Thats the checkbox HTML code: </p>
  
  <pre><code> &lt;div class="form-group"&gt;
               &lt;label for="nsfw" class="control-label"&gt;NSFW&lt;/label&gt;
               &lt;br&gt;
               &lt;input type="checkbox" name="nsfw"&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>And thats the controller code: </p>
  
  <pre><code> if (Input::get('nsfw')) {
         $nsfw = true;
   } else {
         $nsfw = false;
   }
  
   // dd($nsfw) gives me true or 
   //false back, depending if the checkbox is checked or not
  
   $thread = new Thread();
   $thread-&gt;name = Input::get('thread-name');
   $thread-&gt;description = Input::get('thread-desc');
   $thread-&gt;age_min = Input::get('thread-min-age');
   $thread-&gt;age_max = Input::get('thread-max-age');
   if ($nsfw == true) {
       $thread-&gt;nsfw = 1;
   } else {
       $thread-&gt;nsfw = 0;
   }
   $thread-&gt;save();
  </code></pre>
  
  <p>Thanks for your help and sorry for my bad english! </p>