You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
534 B

  1. <?php
  2. use App\Sprint;
  3. use Illuminate\Database\Seeder;
  4. class SprintSeeder extends Seeder
  5. {
  6. public function run()
  7. {
  8. $sprints = [];
  9. for ($business_id=1; $business_id <= 2000; $business_id++) {
  10. for ($i=0; $i < rand(0, 10); $i++) {
  11. $sprints[] = factory(Sprint::class)->raw([
  12. 'business_id' => $business_id,
  13. 'project_id' => rand(1, 4027),
  14. ]);
  15. }
  16. }
  17. DB::table('sprints')->insertOrIgnore($sprints);
  18. }
  19. }