<?php

use Illuminate\Database\Seeder;

class PhotoGalleryDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $photoGalleries = factory(\App\PhotoGallery::class, 18)->create();

        foreach ($photoGalleries as $photoGallery) {
            foreach (languages() as $language) {
                factory(\App\PhotoGalleryDescription::class)->create(
                    [
                        'photo_gallery_id' => $photoGallery->id,
                        'language_id' => $language->id
                    ]
                );
            }
        }
    }
}
