title: Laravel Factories and Seeding: Static array of arrays
body: <p>For some of my tables, I'd like to insert a fixed amount of rows with specific data.</p>
  
  <p>This is my categories factory:</p>
  
  <pre><code>$factory-&gt;define(Category::class, function (Faker $faker) {
      return [
          [
              'name' =&gt; 'Politics',
              'slug' =&gt; 'politics',
              'description' =&gt; 'To discuss politics'
          ],
          [
              'name' =&gt; 'News and Events',
              'slug' =&gt; 'news',
              'description' =&gt; 'To discuss news and world events'
          ],
          [
              'name' =&gt; 'Food and Cooking',
              'slug' =&gt; 'cooking',
              'description' =&gt; 'To discuss cooking and food'
          ],
          [
              'name' =&gt; "Animals and Nature",
              'slug' =&gt; 'animals-nature',
              'description' =&gt; 'To discuss politics'
          ]
      ];
  });
  </code></pre>
  
  <p>This is the seeder:</p>
  
  <pre><code>public function run() {
     factory(App\Category::class, 1)-&gt;create();
  }
  </code></pre>
  
  <p>I get this error: <code>preg_match() expects parameter 2 to be string, array given</code></p>
  
  <p>Is there a way to insert a fixed amount of static information into certain tables using seeding and factories?</p>