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.
63 lines
1.9 KiB
63 lines
1.9 KiB
<?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', |
|
// ]); |
|
// } |
|
} |
|
} |