Skip to content

Commit

Permalink
update: insertOrIgnore
Browse files Browse the repository at this point in the history
  • Loading branch information
syofyanzuhad authored and uyab committed Sep 14, 2021
1 parent 386c3f5 commit a2d6c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Seeds/VillagesSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function run()

$collection = collect($data);
foreach ($collection->chunk(50) as $chunk) {
DB::table(config('laravolt.indonesia.table_prefix').'villages')->insert($chunk->toArray());
DB::table(config('laravolt.indonesia.table_prefix').'villages')->insertOrIgnore($chunk->toArray());
}
}
}
Expand Down

0 comments on commit a2d6c1c

Please sign in to comment.