Skip to content

Commit

Permalink
DB seed function in testing now accept an array too
Browse files Browse the repository at this point in the history
  • Loading branch information
johannebert committed Dec 4, 2018
1 parent 57dedf1 commit 1e51748
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ protected function getConnection($connection = null)
/**
* Seed a given database connection.
*
* @param string $class
* @param string|array $classes
* @return $this
*/
public function seed($class = 'DatabaseSeeder')
public function seed($classes = 'DatabaseSeeder')
{
$this->artisan('db:seed', ['--class' => $class, '--no-interaction' => true]);
foreach ((array) $classes as $class) {
$this->artisan('db:seed', ['--class' => $class, '--no-interaction' => true]);
}

return $this;
}
Expand Down

0 comments on commit 1e51748

Please sign in to comment.