Skip to content

Commit

Permalink
update the way seeders are called
Browse files Browse the repository at this point in the history
according to this method https://github.com/laravel/framework/blob/5.5/src/Illuminate/Database/Seeder.php#L32, you can pass an array of classes to the `call` method.  looks like the system was setup to work this way, so let's use it in the docs.
  • Loading branch information
browner12 authored Oct 16, 2017
1 parent 5a05318 commit 9ca2c3a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ Within the `DatabaseSeeder` class, you may use the `call` method to execute addi
*/
public function run()
{
$this->call(UsersTableSeeder::class);
$this->call(PostsTableSeeder::class);
$this->call(CommentsTableSeeder::class);
$this->call([
UsersTableSeeder::class,
PostsTableSeeder::class,
CommentsTableSeeder::class,
]);
}

<a name="running-seeders"></a>
Expand Down

0 comments on commit 9ca2c3a

Please sign in to comment.