Ejemplo n.º 1
0
 public function run()
 {
     $faker = Faker\Factory::create();
     $modIds = Mod::lists('id');
     $authorsId = Author::lists('id');
     foreach (range(1, 50) as $index) {
         DB::table('author_mod')->insert(['author_id' => $faker->randomElement($authorsId), 'mod_id' => $faker->randomElement($modIds), 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     }
 }
 public function run()
 {
     $faker = Faker\Factory::create();
     $modIds = Mod::lists('id');
     $minecraftVersionIds = MinecraftVersion::lists('id');
     foreach (range(1, 50) as $index) {
         DB::table('minecraft_version_mod')->insert(['minecraft_version_id' => $faker->randomElement($minecraftVersionIds), 'mod_id' => $faker->randomElement($modIds), 'created_at' => date('Y-m-d H:i:s'), 'updated_at' => date('Y-m-d H:i:s')]);
     }
 }