<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        // \App\Models\User::factory(10)->create();
        $makes = [
            'Toyota',
            'Honda',
            'BMW',
            'Mercedes-Benz',
            'Audi',
            'Ford',
            'Chevrolet',
            'Nissan',
            'Hyundai',
            'Kia',
            'Volkswagen',
            'Subaru',
            'Mazda',
            'Porsche',
            'Lexus',
            'Jaguar',
            'Land Rover',
            'Ferrari',
            'Lamborghini',
            'Tesla',
        ];

        foreach ($makes as $make) {
            Make::create([
                'name' => $make,
                'slug' => Str::slug($make),
                'number_of_cars' => 0,
            ]);
        }

        $categories = [
            'Sedan',
            'SUV',
            'Coupe',
            'Convertible',
            'Hatchback',
            'Minivan',
            'Pickup Truck',
            'Station Wagon',
            'Sports Car',
            'Luxury Car',
            'Electric Car',
            'Hybrid Car',
            'Off-road',
        ];

        foreach ($categories as $category) {
            Category::create([
                'name' => $category,
                'slug' => Str::slug($category),
                'number_of_cars' => 0,
            ]);
        }
    }
}
