<?php

namespace Database\Seeders;

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

class CategorySeeder extends Seeder
{
    public function run()
    {
        // Daftar kategori yang mau kita masukkan
        $categories = ['Jaket', 'Kaos', 'Celana', 'Hoodie', 'Kemeja', 'Topi', 'Sepatu'];

        foreach ($categories as $cat) {
            Category::create([
                'name' => $cat,
                'slug' => Str::slug($cat), // Otomatis bikin slug (contoh: Jaket -> jaket)
            ]);
        }
    }
}
