<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Master\Topik;

class TopikSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            ['name' => 'Covid 19'],
            ['name' => 'Keagamaan'],
            ['name' => 'Kehutanan, Pertanian & Ketahanan Pangan'],
            ['name' => 'Kelautan, Perikanan & Peternakan'],
            ['name' => 'Kepegawaian'],
            ['name' => 'Kependudukan'],
            ['name' => 'Kesatuan Bangsa & Politik'],
            ['name' => 'Kesehatan'],
            ['name' => 'Ketenagakerjaan'],
            ['name' => 'Ketertiban Umum'],
            ['name' => 'Keuangan Daerah'],
            ['name' => 'Komunikasi dan Informasi'],
            ['name' => 'Lingkungan Hidup'],
            ['name' => 'Olahraga & Pemuda'],
            ['name' => 'Pariwisata & Kebudayaan'],
            ['name' => 'Pekerjaan Umum'],
            ['name' => 'Pemerintahan'],
            ['name' => 'Penanaman Modal'],
            ['name' => 'Penanggulangan Bencana'],
            ['name' => 'Penataan Kota'],
            ['name' => 'Pendidikan'],
            ['name' => 'Perdanganan'],
            ['name' => 'Perekonomian'],
            ['name' => 'Perhubungan'],
            ['name' => 'Perindustrian & Energi'],
            ['name' => 'Perpustakaan & Arsip'],
            ['name' => 'Pertamanan & Pemakaman'],
            ['name' => 'Perumahan dan Kawasan Permukiman'],
            ['name' => 'Sosial'],
            ['name' => 'Statistik Sektoral'],
        ];
        
        foreach($data as $valData){
            Topik::updateOrCreate([
                'name' => $valData['name'],
            ],[
                'name' => $valData['name'],
            ]);
        }
    }
}
