<?php

use Illuminate\Database\Seeder;

class SliderDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $sliders = factory(\App\Slider::class, 5)->create();

        foreach ($sliders as $slider) {
            foreach (languages() as $language) {
                factory(\App\SliderDescription::class)->create(
                    [
                        'slider_id' => $slider->id,
                        'language_id' => $language->id
                    ]
                );
            }
        }
    }
}
