|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
use App\Models\m_warehouse;
|
|
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class WarehouseSeeder extends Seeder
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the database seeds.
|
|
|
|
*/
|
|
|
|
public function run(): void
|
|
|
|
{
|
|
|
|
// Warehouse Jakarta
|
|
|
|
m_warehouse::create([
|
|
|
|
'name' => 'Jakarta',
|
|
|
|
'description' => 'PT Indonesia Steel Tube Works Jakarta Office',
|
|
|
|
'address' => 'Jln. Jakarta Timur',
|
|
|
|
'created_by' => 'Seeder',
|
|
|
|
'updated_by' => 'Seeder',
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Warehouse Bekasi
|
|
|
|
m_warehouse::create([
|
|
|
|
'name' => 'Bekasi',
|
|
|
|
'description' => 'PT Indonesia Steel Tube Works Bekasi Office',
|
|
|
|
'address' => 'Jln. Bekasi',
|
|
|
|
'created_by' => 'Seeder',
|
|
|
|
'updated_by' => 'Seeder',
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Warehouse Semarang
|
|
|
|
m_warehouse::create([
|
|
|
|
'name' => 'Semarang',
|
|
|
|
'description' => 'PT Indonesia Steel Tube Works Semarang Office',
|
|
|
|
'address' => 'Jln. Semarang',
|
|
|
|
'created_by' => 'Seeder',
|
|
|
|
'updated_by' => 'Seeder',
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Warehouse Surabaya
|
|
|
|
m_warehouse::create([
|
|
|
|
'name' => 'Surabaya',
|
|
|
|
'description' => 'PT Indonesia Steel Tube Works Surabaya Office',
|
|
|
|
'address' => 'Jln. Surabaya',
|
|
|
|
'created_by' => 'Seeder',
|
|
|
|
'updated_by' => 'Seeder',
|
|
|
|
]);
|
|
|
|
|
|
|
|
// Use a loop to add 1000 warehouses
|
|
|
|
// for ($i = 5; $i <= 100; $i++) {
|
|
|
|
// m_warehouse::create([
|
|
|
|
// 'name' => 'Warehouse ' . $i,
|
|
|
|
// 'description' => 'Description for Warehouse ' . $i,
|
|
|
|
// 'address' => 'Address for Warehouse ' . $i,
|
|
|
|
// 'created_by' => 'Seeder',
|
|
|
|
// 'updated_by' => 'Seeder',
|
|
|
|
// ]);
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|