title: Add Checkbox to database in Laravel 5
body: <p>Im not 100% great in html and databases but I'm getting there. What I did works but not when I'm editing a page that has checkboxes.</p>
  
  <p><strong>In my database migration:</strong></p>
  
  <pre><code>$table-&gt;string('check_this')-&gt;nullable();
  </code></pre>
  
  <p><strong>In views:</strong></p>
  
  <pre><code>&lt;div class="checkbox"&gt;
      @if ($job-&gt;check_this == 'selected')
           &lt;label&gt;&lt;input type="checkbox" name="check_this" value="selected" checked&gt;Yes.&lt;/label&gt;
      @else
           &lt;label&gt;&lt;input type="checkbox" name="check_this" value="selected"&gt;Yes.&lt;/label&gt;
     @endif
  &lt;/div&gt;
  </code></pre>
  
  <p>Once the checkbox is checked, it writes to the db so my if statement wont work correctly. Is there a way that if unchecked it deletes the value from the database?</p>
  
  <p>Maybe I have go about this is the wrong way as in the correct format for checkboxes in a migration.</p>