<?php

use App\Package;
use App\PackageDescription;
use Illuminate\Database\Seeder;

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

        factory(Package::class)->create([
            'image' => 'assets/web/images/icons/pkg-1.png',
            'price' => '180',
            'available_users' => '10',
        ]);
        factory(Package::class)->create([
            'image' => 'assets/web/images/icons/pkg-2.png',
            'price' => '1900',
            'available_users' => '10',
        ]);


        foreach (languages() as $language){
            factory(PackageDescription::class)->create([
                'name' => 'الباقه الشهرية',
                'period' => '30 يوم',
                'package_id' => 1,
                'language_id' => $language->id,
            ]);
            factory(PackageDescription::class)->create([
                'name' => 'الباقه السنوية',
                'period' => '365 يوم + 30 يوم',
                'package_id' => 1,
                'language_id' => $language->id,
            ]);
        }

    }
}
