<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Website\Post;

class PostsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // Uncomment the following line if you want to run this only in the local environment
        // if (\App::environment('local')) {
        //     Post::truncate();
        // }

        $page = [
            'title'            => 'General Information',
            'code'             => 'GENERAL_INFORMATION',
            'slug'             => 'general-information',
            'company_id'       => 1,
            'description'      => 'Whether you want to learn or to share what you know you’ve come to the right place',
            'video_url'        => '',
            'image'            => '',
            'meta_title'       => 'General Information',
            'meta_key'         => '',
            'meta_url'         => '',
            'meta_description' => 'General Information',
            'body'             => '<div class="row align-items-center">
                <div class="col-lg-6">
                    <!-- About Images Start -->
                    <div class="about-images">

                        <img class="shape-1" src="assets/images/shape/shape-11.svg" loading="lazy" alt="shape">

                        <div class="row align-items-center">
                            <div class="col-6">
                                <!-- Single Image Start -->
                                <div class="single-image">
                                    <img src="https://dummyimage.com/280x452/e1e6ea/c3cdd6.jpg" loading="lazy" alt="About">
                                </div>
                                <!-- Single Image End -->
                            </div>
                            <div class="col-6">
                                <!-- Single Image Start -->
                                <div class="single-image">
                                    <img src="https://dummyimage.com/284x282/e1e6ea/c3cdd6.jpg" loading="lazy" alt="About">
                                </div>
                                <!-- Single Image End -->
                                <!-- Single Image Start -->
                                <div class="single-image">
                                    <img src="https://dummyimage.com/286x286/e1e6ea/c3cdd6.jpg" loading="lazy" alt="About">
                                </div>
                                <!-- Single Image End -->
                            </div>
                        </div>
                    </div>
                    <!-- About Images End -->
                </div>
                <div class="col-lg-6">
                    <!-- About Images Start -->
                    <div class="about-content">
                        <h3 class="title">Whether you want to learn or to share what you know you’ve come to the right place</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>

                        <a href="https://youtu.be/UClu9x_8PFg" data-fancybox="video" class="play"><i class="far fa-play"></i> <span>Play Video</span></a>
                    </div>
                    <!-- About Images End -->
                </div>
            </div>'
        ];

        Post::firstOrCreate(['code' => 'GENERAL_INFORMATION'], $page);
    }
}
