<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

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

//        DB::unprepared(file_get_contents(storage_path('db_files_execute/cities.sql')));
       $cities = factory(\App\City::class, 3)->create();

        foreach (languages() as $language) {
            factory(\App\CityDescription::class)->create([
                'name' => 'Mekkah',
                'city_id' => 1,
                'language_id' => $language->id,
            ]);
            factory(\App\CityDescription::class)->create([
                'name' => 'Madinah',
                'city_id' => 2,
                'language_id' => $language->id,
            ]);
            factory(\App\CityDescription::class)->create([
                'name' => 'Riyadh',
                'city_id' => 3,
                'language_id' => $language->id,
            ]);
       }
    }
}
