title: Laravel seeding preg_replace(): error
body: <p>I was wondering if someone can help me.</p>
  
  <p>I am having trouble seeding a database in laravel using seeder, it keeps throughing this error:</p>
  
  <pre><code>preg_replace(): Parameter mismatch, pattern is a string while replacement is an array
  </code></pre>
  
  <p>When running php artisan db:seed</p>
  
  <p>the seeder in question is: GroupTableSeeder.php and the code in the file is:</p>
  
  <pre><code>&lt;?php
  
  class GroupTableSeeder extends Seeder {
  
  public function run()
  {
  
  DB::table('groups')-&gt;truncate();
  
  $permissions = array( 'system' =&gt; 1, );
  $group = array(
      array(
          'name' =&gt; 'agency', 
          'permissions' =&gt; $permissions, 
          'created_at' =&gt; new DateTime, 
          'updated_at' =&gt; new DateTime
      ),
  );
  
  DB::table('groups')-&gt;insert($group);
  
   }
  }
  </code></pre>
  
  <p>In the DatabaseSeeder.php I have:</p>
  
  <pre><code>public function run()
  {
      Eloquent::unguard();
  
      $this-&gt;call('GroupTableSeeder');
      $this-&gt;command-&gt;info('Group table seeded!');
  }
  </code></pre>
  
  <p>I am trying to populate the Groups table with a user role I am currently using <a href="https://cartalyst.com/manual/sentry#groups" rel="nofollow">https://cartalyst.com/manual/sentry#groups</a></p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Cheers,
  Chris</p>