title: factory function in Laravel won't work
body: <p>Hi I am fairly new to Laravel. I am trying to seed my database using model factories, but during testing my factory the factory function is complaining an error.</p>
  
  <p><img src="https://i.stack.imgur.com/yPb6K.png" alt="enter image description here"></p>
  
  <p>User Model</p>
  
  <pre><code>class User extends Model {
  
      protected $table = 'users';
      use SoftDeletes;
      protected $dates = ['deleted_at'];
  
      protected $fillable = [
          'name',
          'email',
          'password',
          'remember_token',
          'ip_address',
          'active',
          'deleted_at',
      ];
  
  }
  </code></pre>
  
  <p>The Factory</p>
  
  <pre><code>$factory-&gt;define('App\User', function ($faker) {
      return [
  
          'name' =&gt; $faker-&gt;name,
          'email' =&gt; $faker-&gt;safeEmail,
          'password' =&gt; $faker-&gt;word,
          'remember_token' =&gt; $faker-&gt;word,
          'ip_address' =&gt; $faker-&gt;streetAddress,
          'active' =&gt; $faker-&gt;randomElement($array = array('',null)),
          'created_at' =&gt; $faker-&gt;dateTime($max = 'now'),
          'updated_at' =&gt; $faker-&gt;dateTime($max = 'now'),
          'deleted_at' =&gt; $faker-&gt;dateTime($max = 'now'),
  
      ];
  });
  </code></pre>
  
  <p>Where did I go wrong?</p>