<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Category;

class CategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $categories = [
            ['name' => 'ଓଡ଼ିଶା', 'slug' => 'odisha'],
            ['name' => 'ଜାତୀୟ', 'slug' => 'national'],
            ['name' => 'ରାଜନୀତି', 'slug' => 'politics'],
            ['name' => 'ଅପରାଧ', 'slug' => 'crime'],
            ['name' => 'କ୍ରୀଡ଼ା', 'slug' => 'sports'],
            ['name' => 'ମନୋରଞ୍ଜନ', 'slug' => 'entertainment'],
        ];

        foreach ($categories as $category) {
            Category::updateOrCreate(['slug' => $category['slug']], $category);
        }
    }
}
