<?php

use Illuminate\Database\Seeder;

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

        foreach (\App\Sector::cursor() as $sector) {
            foreach (languages() as $language) {
                factory(\App\SectorDescription::class)->create([
                    'sector_id' => $sector->id,
                    'language_id' => $language->id,
                ]);
            }
        }
    }
}
