<?php

use App\Supplier;
use App\SupplierDescription;
use Illuminate\Database\Seeder;

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

        $suppliers = factory(Supplier::class, 5)->create();

        foreach ($suppliers as $supplier){
            foreach (languages() as $language){
                factory(SupplierDescription::class)->create([
                        'supplier_id' => $supplier->id,
                        'language_id' => $language->id,
                    ]);
            }

        }
    }
}
