<?php

use Illuminate\Database\Seeder;

class CaseTopicSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $topics = factory(\App\CaseTopic::class, 3)->create();

        foreach (languages() as $language) {
            foreach ($topics as $topic) {
                factory(\App\CaseTopicDescription::class)->create([
                    'case_topic_id' => $topic->id,
                    'language_id' => $language->id,
                ]);
            }


        }
    }
}
