<?php

use Illuminate\Database\Seeder;

class SliderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {


        $sliders = factory(\App\Slider::class, 10)->create();

        foreach ($sliders as $slider) {
            foreach (languages() as $language) {
                factory(\App\SliderDescription::class)->create([
                    'slider_id' => $slider->id,
                    'language_id' => $language->id,
                ]);
            }
        }
//        $slider = factory(\App\PhotoCategory::class)->create();
//
////        foreach ($sliders as $slider) {
//            foreach (languages() as $language) {
//                factory(\App\PhotoCategoryDescription::class)->create([
//                    'photo_category_id' => $slider->id,
//                    'language_id' => $language->id,
//                ]);
//            }
//
//            $photos = factory(\App\Photo::class, 5)->create([
//                'image' => 'assets/web/images/header.png',
//                'photo_category_id' => $slider->id,
//            ]);
//
//        foreach ($photos as $photo) {
//            foreach (languages() as $language) {
//                factory(\App\PhotoDescription::class)->create([
//                    'photo_id' => $photo->id,
//                    'language_id' => $language->id,
//                ]);
//            }
//        }
////        }
    }
}
