<?php

use Illuminate\Database\Seeder;

class SliderSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $homeImages = [
            'assets/web/images/header-6.png',
            'assets/web/images/header-1.png',
        ];
        $contactImages = [
            'assets/web/images/header-6.png',
            'assets/web/images/header-1.png',
        ];

        $abouts = [
            'assets/web/images/header-4.png',
            'assets/web/images/banner-2.png',
        ];

        // 1,2
        foreach ($contactImages as $contactImage) {
            factory(\App\Slider::class)->create(['image' => $contactImage, 'show_in' => 'contact']);
        }

        // 3,4
        foreach ($homeImages as $key => $homeImage) {
            factory(\App\Slider::class)->create(['image' => $homeImage, 'show_in' => 'home']);
        }

        // 5
        factory(\App\Slider::class)->create(['image' => 'assets/web/images/banner-1.png', 'show_in' => 'products']);

        // 6,7
        foreach ($abouts as $key => $aboutImage) {
            factory(\App\Slider::class)->create(['image' => $aboutImage, 'show_in' => 'about']);
        }

        // 8
        factory(\App\Slider::class)->create(['image' => 'assets/web/images/header-5.png', 'show_in' => 'contact']);


        foreach (languages() as $language) {
            factory(\App\SliderDescription::class)->create([
                'description' => '“At Cup N Cone, we brighten the day of those who walk through our doors”.',
                'slider_id' => 1,
                'language_id' => $language->id,
            ]);
            factory(\App\SliderDescription::class)->create([
                'description' => ' “ Who walk At Cup N Cone, we brighten the day of those who walk through our doors”.',
                'slider_id' => 2,
                'language_id' => $language->id,
            ]);
            factory(\App\SliderDescription::class)->create([
                'description' => 'A Colorful flavor that will Blow you away',
                'slider_id' => 3,
                'language_id' => $language->id,
            ]);
            factory(\App\SliderDescription::class)->create([
                'description' => 'A Colorful flavor that will Blow you away',
                'slider_id' => 4,
                'language_id' => $language->id,
            ]);

            // بانر وصف صفحة المنتجات
            factory(\App\SliderDescription::class)->create([
                'title' => 'Our recipes are produced with',
                'description' => 'HIGH QUALITY INGREDIENTS',
                'slider_id' => 5,
                'language_id' => $language->id,
            ]);
            // بانر صفحة من نحن
            factory(\App\SliderDescription::class)->create([
                'title' => 'WHO WE ARE',
                'slider_id' => 6,
                'language_id' => $language->id,
            ]);
            factory(\App\SliderDescription::class)->create([
                'description' => '“We strive to create a welcoming atmosphere that shows our customers that they are a part of our family just as we are a part of theirs. In doing so we hope to leave them with a smile, a full heart and a memory that they will never forget”.',
                'slider_id' => 7,
                'language_id' => $language->id,
            ]);
            factory(\App\SliderDescription::class)->create([
                'title' => 'REACH US',
                'slider_id' => 8,
                'language_id' => $language->id,
            ]);


        }

    }
}
