<?php

use App\VideoCategory;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;

class VideoCategoryDescriptionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach (VideoCategory::cursor() as $category){
            DB::table('video_category_descriptions')->insert([
                [
                    'name' => Str::random(16),
                    'slug' => Str::slug(Str::random(10) ,'-'),
                    'keywords' => Str::random(10),
                    'meta_description' => Str::random(10),
                    'video_category_id' => $category->id,
                    'language_id' => 1
                ],
                [
                    'name' => Str::random(16),
                    'slug' => Str::slug(Str::random(10) ,'-'),
                    'keywords' => Str::random(10),
                    'meta_description' => Str::random(10),
                    'video_category_id' => $category->id,
                    'language_id' => 2
                ]
            ]);
        }
    }
}
