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.
49 lines
1.4 KiB
49 lines
1.4 KiB
1 year ago
|
<?php
|
||
|
|
||
|
namespace Database\Seeders;
|
||
|
|
||
11 months ago
|
use App\Models\Customer;
|
||
1 year ago
|
use Illuminate\Database\Seeder;
|
||
|
|
||
11 months ago
|
class CustomerSeeder extends Seeder
|
||
1 year ago
|
{
|
||
|
/**
|
||
|
* Run the database seeds.
|
||
|
*/
|
||
|
public function run(): void
|
||
|
{
|
||
1 year ago
|
// Sisipkan data pertama
|
||
11 months ago
|
Customer::create([
|
||
|
'name' => 'DHARMA G',
|
||
1 year ago
|
'code_customer' => 'DPM',
|
||
|
'lot_no' => 'JKT23',
|
||
|
'no_tlp' => '02122344',
|
||
|
'address' => 'Jalan Raya Ciwatu',
|
||
1 year ago
|
'created_by' => 'Seeder',
|
||
|
'updated_by' => 'Seeder',
|
||
|
]);
|
||
1 year ago
|
|
||
|
// Sisipkan data kedua
|
||
11 months ago
|
Customer::create([
|
||
|
'name' => 'ADHI CHANDRA G',
|
||
1 year ago
|
'code_customer' => 'ACJ',
|
||
|
'lot_no' => 'JKT23',
|
||
|
'no_tlp' => '02198765',
|
||
|
'address' => 'Jalan Raya Gelarmendala',
|
||
1 year ago
|
'created_by' => 'Seeder',
|
||
|
'updated_by' => 'Seeder',
|
||
|
]);
|
||
11 months ago
|
|
||
|
for ($i = 3; $i <= 100; $i++) {
|
||
|
Customer::create([
|
||
|
'name' => 'Customer ' . $i,
|
||
|
'code_customer' => 'Code ' . $i, // Adjust the length as needed
|
||
|
'lot_no' => 'Lot ' . $i, // Adjust the length as needed
|
||
|
'no_tlp' => '12345678 ' . $i, // Adjust the length as needed
|
||
|
'address' => 'Address ' . $i,
|
||
|
'created_by' => 'Seeder',
|
||
|
'updated_by' => 'Seeder',
|
||
|
]);
|
||
|
}
|
||
1 year ago
|
}
|
||
11 months ago
|
}
|