make faker for gadai and changes marhun to make the calculation for the gold, update composer remove helpers

This commit is contained in:
Hafifie PKB
2023-11-23 16:15:35 +08:00
parent 72fb590b2f
commit e6ef310333
6 changed files with 170 additions and 10 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
use Faker\Factory as FakerFactory;
use Illuminate\Support\Facades\DB;
$faker = FakerFactory::create();
$gadaiFactory = new GadaiFactory($faker);
$marhunFactory = new MarhunFactory($faker);
// Create 10 instances of Gadai
for ($i = 0; $i < 10; $i++) {
DB::connection('mysql')->table('gadai')->insert($gadaiFactory->create());
DB::connection('mysql')->table('marhun')->insert($marhunFactory->create());
}
exit();
?>