<?php

use Illuminate\Database\Seeder;

class CityDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach (\App\Country::cursor() as $country) {
           factory(\App\City::class, 3)->create(['country_id' => $country->id]);
        }

        foreach (\App\City::cursor() as $city) {
            foreach (languages() as $language) {
                factory(\App\CityDescription::class)->create([
                    'city_id' => $city->id,
                    'language_id' => $language->id,
                ]);
            }
        }
    }
}
