<?php

use Illuminate\Database\Seeder;

class DoctorSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $doctors = factory(\App\Doctor::class, 7)->create();

        foreach ($doctors as $doctor) {
            foreach (languages() as $language) {
                factory(\App\DoctorDescription::class)->create([
                    'doctor_id' => $doctor->id,
                    'language_id' => $language->id,
                ]);
            }

        }

    }
}
