<?php

namespace Database\Seeders;

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

class CitySeeder extends Seeder
{
    public function run(): void
    {
        $cities = [
            ['name' => 'Melbourne', 'country' => 'Australia'],
            ['name' => 'Sydney', 'country' => 'Australia'],
            ['name' => 'Brisbane', 'country' => 'Australia'],
            ['name' => 'Perth', 'country' => 'Australia'],
            ['name' => 'Minneapolis', 'country' => 'USA'],
            ['name' => 'Columbus', 'country' => 'USA'],
            ['name' => 'Seattle', 'country' => 'USA'],
            ['name' => 'Washington DC', 'country' => 'USA'],
            ['name' => 'London', 'country' => 'UK'],
            ['name' => 'Cardiff', 'country' => 'UK'],
            ['name' => 'Ottawa', 'country' => 'Canada'],
            ['name' => 'Toronto', 'country' => 'Canada'],
            ['name' => 'Stockholm', 'country' => 'Sweden'],
            ['name' => 'Oslo', 'country' => 'Norway'],
            ['name' => 'Copenhagen', 'country' => 'Denmark'],
            ['name' => 'Dubai', 'country' => 'UAE'],
            ['name' => 'Doha', 'country' => 'Qatar'],
            ['name' => 'Mogadishu', 'country' => 'Somalia'],
            ['name' => 'Hargeisa', 'country' => 'Somalia'],
            ['name' => 'Bosaso', 'country' => 'Somalia'],
        ];

        foreach ($cities as $city) {
            City::firstOrCreate($city);
        }
    }
}
