%PDF- %PDF-
| Direktori : /home2/rezakur1/so.rezakurnia.com/Stock-Opname-Website/database/seeders/ |
| Current File : /home2/rezakur1/so.rezakurnia.com/Stock-Opname-Website/database/seeders/MasterLocationSeeder.php |
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\MasterLocation;
class MasterLocationSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$locations = [
[
'code' => 'B.JADI1',
'name' => 'Barang Jadi 1',
],
[
'code' => 'B.JADI2',
'name' => 'Barang Jadi 2',
],
[
'code' => 'B.JADI3',
'name' => 'Barang Jadi 3',
],
[
'code' => 'PN.HOLD',
'name' => 'Plant Ngoro Hold',
],
[
'code' => 'PN.RIMP',
'name' => 'Plant Ngoro Rimp',
],
[
'code' => 'PK.BJADI',
'name' => 'Plant Karawang Barang Jadi',
],
[
'code' => 'PK.VLS',
'name' => 'Plant Karawang VLS',
],
[
'code' => 'PK.HOLD',
'name' => 'Plant Karawang Hold',
],
[
'code' => 'B.SMG',
'name' => 'Barang Jadi Semarang',
],
[
'code' => 'G.SDA',
'name' => 'Gudang Sidoarjo',
],
];
foreach ($locations as $location) {
MasterLocation::updateOrCreate(
['code' => $location['code']],
['name' => $location['name']]
);
}
}
}