<?php

use App\Partner;
use App\PartnerDescription;
use Illuminate\Database\Seeder;

class PartnerSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $images = [
            'assets/web/images/partn/1.svg',
            'assets/web/images/partn/2.svg',
            'assets/web/images/partn/3.svg',
            'assets/web/images/partn/4.svg',
            'assets/web/images/partn/5.svg',
        ];

//        foreach ($images as $image) {
            $partners = factory(Partner::class, 7)->create(['image' => 'assets/admin/images/logo.png']);
//        }
        foreach ($partners as $partner) {
            foreach (languages() as $language) {
                factory(PartnerDescription::class)->create([
                    'partner_id' => $partner->id,
                    'language_id' => $language->id,
                ]);
            }
        }
    }
}
