<?php

use Illuminate\Database\Seeder;

class DirectorSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $directors = factory(\App\Director::class, 7)->create();

        foreach ($directors as $director) {
            foreach (languages() as $language) {
                factory(\App\DirectorDescription::class)->create([
                    'director_id' => $director->id,
                    'language_id' => $language->id,
                ]);
            }

        }

    }
}
