<?php

use Illuminate\Database\Seeder;

class PackageDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(\App\Package::class)->create(['package_type' => 'u']);
        factory(\App\Package::class)->create(['package_type' => 'ut']);
        factory(\App\Package::class)->create(['package_type' => 'uta']);

        foreach (\App\Package::cursor() as $package) {

            factory(\App\PackagePoint::class, 3)->create(['package_id' => $package->id]);

//            foreach (languages() as $language) {

//            }
        }

        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'عمرة فقط',
                'package_id' => 1,
                'language_id' => 1,
            ]
        );
        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'Umrah only',
                'package_id' => 1,
                'language_id' => 2,
            ]
        );
        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'عمرة وتنقل',
                'package_id' => 2,
                'language_id' => 1,
            ]
        );
        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'Umrah and transportation',
                'package_id' => 2,
                'language_id' => 2,
            ]
        );

        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'عمرة وتنقل وإقامة',
                'package_id' => 3,
                'language_id' => 1,
            ]
        );
        factory(\App\PackageDescription::class)->create(
            [
                'name' => 'Umrah, transfer and accommodation',
                'package_id' => 3,
                'language_id' => 2,
            ]
        );

    }
}
