<?php

use Illuminate\Database\Seeder;

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

        $images = [
            'assets/web/images/serv1.png',
            'assets/web/images/serv3.png',
            'assets/web/images/serv2.png',
            'assets/web/images/serv4.png',
            'assets/web/images/consultation-req-1.png',
            'assets/web/images/consultation-req-2.png',
        ];

        foreach ($images as $image) {
            factory(\App\Service::class)->create(['image' => $image]);
        }

        foreach (\App\Service::cursor() as $service) {
            foreach (languages() as $language) {
                factory(\App\ServiceDescription::class)->create(
                    [
                        'service_id' => $service->id,
                        'language_id' => $language->id,
                    ]
                );
            }
        }



    }
}
