<?php

use Illuminate\Database\Seeder;

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

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