fix conflict, fix marhun harga, add faker in gadai and fix composer
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Faker\Factory as FakerFactory;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class GadaiSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$faker = FakerFactory::create();
|
||||
$gadaiFactory = new GadaiFactory($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($gadaiFactory->create());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user