<?php

use App\Suplier;
use App\SuplierDescription;
use Illuminate\Database\Seeder;

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

        $supliers = factory(Suplier::class, 5)->create();

        foreach ($supliers as $suplier){
            foreach (languages() as $language){
                factory(SuplierDescription::class)->create([
                        'suplier_id' => $suplier->id,
                        'language_id' => $language->id,
                    ]);
            }

        }
    }
}
