<?php

use Illuminate\Database\Seeder;

class ProductSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $products = factory(\App\Product::class, 10)->create();

        foreach ($products as $product) {
            foreach (languages() as $language) {
                factory(\App\ProductDescription::class)->create([
                    'product_id' => $product->id,
                    'language_id' => $language->id,
                ]);
            }
        }

    }
}
