title: laravel eloquent model casts on save?
body: <p><a href="https://laravel.com/docs/5.4/eloquent-mutators#attribute-casting" rel="nofollow noreferrer">https://laravel.com/docs/5.4/eloquent-mutators#attribute-casting</a> e.g. </p>
  
  <p><code>protected $casts = [ 'price' =&gt; 'integer', ];</code> now this will cast when retrieving the value. When saving, I am actually not sure what <code>$book-&gt;price = "20"</code> will do, e.g. most likely it will save 20. </p>
  
  <p>That is my guess, is it right? </p>
  
  <p>What will <code>$book-&gt;someboolean</code> with <code>$casts =[ 'someboolean' -&gt; 'boolean'];</code></p>
  
  <p><code>$book-&gt;someboolean = 'false'; $book-&gt;save();</code></p>
  
  <p><code>$book-&gt;someboolean = '0'; $book-&gt;save();</code></p>
  
  <p><code>$book-&gt;someboolean = 0; $book-&gt;save();</code></p>
  
  <p><code>$book-&gt;someboolean = null; $book-&gt;save();</code></p>
  
  <p>what will it store?</p>