Laravel Seeding Calling other seeders


Example

Within your DatabaseSeeder class you are able to call other seeders

$this->call(TestSeeder::class)

This allows you to keep one file where you can easily find your seeders. Keep in mind that you need to pay attention to the order of your calls regarding foreign key constraints. You can't reference a table that doesn't exist yet.