title: Laravel 9 - Seeder | TypeError array_merge(): Argument #2 must be of type array, int given
body: <p>I have two tables named Order and OrderItem. While creating data in the Order table, I am trying to enter data into the OrderItem table at the same time. The codes are as follows;</p>
  <p><strong>OrderSeeder.php</strong></p>
  <pre><code>public function run()
  {
      Order::factory()-&gt;count(30)-&gt;create()
          -&gt;each(function (Order $order) {
              Order::factory( OrderItem::class, random_int(1, 5))-&gt;create([
                 'order_id' =&gt; $order-&gt;id,
              ]);
          });
  }
  </code></pre>
  <p><strong>OrderFactory.php</strong></p>
  <pre><code>public function definition()
  {
      return [
          'first_name' =&gt; $this-&gt;faker-&gt;name(),
          'last_name' =&gt; $this-&gt;faker-&gt;lastName(),
          'email' =&gt; $this-&gt;faker-&gt;email(),
  
      ];
  }
  </code></pre>
  <p><strong>OrderItemFactory.php</strong></p>
  <pre><code>public function definition()
  {
      return [
          'product_title' =&gt; $this-&gt;faker-&gt;text(30),
          'price' =&gt; $this-&gt;faker-&gt;numberBetween(10.100),
          'quantity' =&gt; $this-&gt;faker-&gt;numberBetween(1, 5),
      ];
  }
  </code></pre>