<?php

use Illuminate\Database\Seeder;

class RoomSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $rooms = factory(\App\Room::class, 10)->create();

        foreach ($rooms as $room) {
            foreach (languages() as $language) {
                factory(\App\RoomDescription::class)->create([
                    'room_id' => $room->id,
                    'language_id' => $language->id,
                ]);
            }
        }
    }
}
