Adding seed data to migrations.
It often happens that you need some data to be available inside a migration. But the same data might be required in a Seeder (if you want to run it on test environtment). To make the data available for both in Seeder and Migration - you can simply call it inside a migration. Like that:
$seeder = new YourClassSeeder(); $seeder->run();
But you have to check inside the seeder file if the data is already available for your App, (so that you would not end up with two sets of the same data, after calling both migrations and seeders in testing machine).