<?php

use Illuminate\Database\Seeder;

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

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


        }
    }
}
