title: Does firstOrCreate respects casts?
body: <p>I have a tag model with the following:</p>
  <pre class="lang-php prettyprint-override"><code>$table-&gt;string('name')-&gt;unique();
  $table-&gt;string('slug')-&gt;unique();
  </code></pre>
  <p>I am using <code>firstOrCreate()</code>:</p>
  <pre class="lang-php prettyprint-override"><code>$name = &quot;test tag 1&quot;;
  Tag::firstOrCreate(['name' =&gt; $name, 'slug' =&gt; $name])
  </code></pre>
  <p>An inbound cast is handling the slug before inserting it. This works fine for the first time only. It seems like it only uses the cast for inserting, not for checking if it exists.</p>
  <p>Inserting:</p>
  <pre class="lang-sql prettyprint-override"><code>insert into
    &quot;tags&quot; (&quot;name&quot;, &quot;slug&quot;, &quot;updated_at&quot;, &quot;created_at&quot;)
  values
    (
      'test tag 1',
      'test-tag-1',
    )
  </code></pre>
  <p>Checking:</p>
  <pre class="lang-sql prettyprint-override"><code>select
    *
  from
    &quot;tags&quot;
  where
    (
      &quot;name&quot; = 'test tag 1'
      and &quot;slug&quot; = 'test tag 1'
    )
  </code></pre>
  <p>Is there something I could so it would also use the cast when checking with the <code>firstOrCreate()</code> method?</p>