title: I got error array_merge Expected parameter 2 to be in laravel 8 factory?
body: <p>In Laravel 8.12 running factory from controller I got error :</p>
  <pre><code>[2021-01-12 16:42:10] local.ERROR: array_merge(): Expected parameter 2 to be an array, int given {&quot;exception&quot;:&quot;[object] (ErrorException(code: 0): array_merge(): Expected parameter 2 to be an array, int given at /mnt/_work_sdb8/wwwroot/lar/AdsBackend8/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php:381)
  [stacktrace]
  #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions-&gt;handleError()
  #1 /mnt/_work_sdb8/wwwroot/lar/AdsBackend8/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Factories/Factory.php(381): array_merge()
  #2 [internal function]: Illuminate\\Database\\Eloquent\\Factories\\Factory-&gt;Illuminate\\Database\\Eloquent\\Factories\\{closure}()
  #3 /mnt/_work_sdb8/wwwroot/lar/AdsBackend8/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(884): array_reduce()
  </code></pre>
  <p>...
  In the controller I run :</p>
  <pre><code>Ad::addDummyData();
  </code></pre>
  <p>In app/Models/Ad.php:</p>
  <p>public static function addDummyData() {</p>
  <pre><code>$ads = Ad::factory()-&gt;create(10); // POINTS TO THIS LINE
  \Log::info(  varDump($ads, ' -1 addDummyData() $ads::') );
  </code></pre>
  <p>}</p>
  <p>in database/factories/AdFactory.php :</p>
  <pre><code>&lt;?php
  
  namespace Database\Factories;
  
  use Config;
  use App\Models\Ad;
  use Illuminate\Database\Eloquent\Factories\Factory;
  use Illuminate\Support\Str;
  use \Cviebrock\EloquentSluggable\Services\SlugService;
  
  class AdFactory extends Factory
  {
      protected $model = Ad::class;
  
      public function definition()
      {
          $text= $this-&gt;faker-&gt;text;
          $slugValue = SlugService::createSlug(Ad::class, 'slug', $text);
  
          \Log::info(  varDump($slugValue, ' -1 $slugValue::') );
          return [
              'title' =&gt; $text,
              'ad_token' =&gt; $text,
              'slug' =&gt; $slugValue,
              'phone_display' =&gt; (rand(1, 3) == 1),
              'has_locations' =&gt; (rand(1, 4) == 1),
              'status' =&gt; 'A', // password
              'price' =&gt; mt_rand(10, 500),
              'ad_type' =&gt; (rand(1, 2) == 1 ? 'B' : 'S'),
              'expire_date' =&gt; $this-&gt;faker-&gt;dateTimeThisMonth('now', Config::get('app.timezone'))-&gt;format('Y-m-d H:i:s'),
              'description' =&gt; $this-&gt;faker-&gt;paragraphs(rand(1, 4), true),
              'creator_id' =&gt; rand(1, 5),
          ];
      }
  }
  </code></pre>
  <p>In error description I did not any reference to database/factories/AdFactory.php.</p>
  <p>Why error and how it can fixed ?</p>
  <p>Thanks!</p>