<?php

use App\Service;
use App\ServiceDescription;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;

use Faker\Generator as Faker;

class ServiceDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @param Faker $faker
     * @return void
     */
    public function run(Faker $faker)
    {
        foreach (Service::cursor() as $service) {
            foreach (languages() as $language) {
                ServiceDescription::create([
                    'title' => $faker->word,
                    'description' => $faker->paragraph,
                    'service_id' => $service->id,
                    'language_id' => $language->id,
                ]);
            }
        }
    }
}
