Eloquent Model, Illegal offset type error on non-date field
<p>When I try to create a UserFailedLogin object I get an illegal offset type error. When I look closer the it appears to be trying to cast the ip address column to a date. The column is not a date in the DB nor is it in the $date of the model.</p>

<p>Here is my Model:</p>

<pre><code>class UserFailedLogin extends Model {

public $timestamps = false;
protected $table = 'user_failed_login';
protected $fillable = ['ip','email'];
protected $primaryKey = ['invalid_login_id'];
</code></pre>

<p>Here is my create statement:</p>

<pre><code>UserFailedLogin::create(['ip' =&gt; $request-&gt;ip(), 'email'=&gt;$email,]);
</code></pre>

<p>My Error:</p>

<blockquote>
  <p>ErrorException in Model.php line 2759:</p>
  
  <p>Illegal offset type</p>
  
  <ol>
  <li>in Model.php lne 2759</li>
  <li>at HandleExceptions->handleError('2', 'Illegal offset type', '.../vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php',
  '2759', array()) in Model.php line 2759</li>
  <li>at Model->getCasts() in Model.php line 2743</li>
  <li>at Model->hasCast('ip', array('date', 'datetime')) in Model.php line 2774</li>
  <li>at Model->isDateCastable('ip') in Model.php line 2863</li>
  </ol>
</blockquote>