<?php

use App\Faq;
use App\FaqDescription;
use Illuminate\Database\Seeder;

class FaqDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(Faq::class, 5)->create();
        foreach (Faq::cursor() as $faq){
            foreach (languages() as $language){
                factory(FaqDescription::class)->create([
                    'faq_id' => $faq->id,
                    'language_id' => $language->id,
                ]);
            }

        }
    }
}
