<?php

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

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

        $categories = factory(Category::class, 3)->create();
        foreach ($categories as $category){
            foreach (languages() as $language) {
                factory(\App\CategoryDescription::class)->create([
                    'category_id' => $category->id,
                    'language_id' => $language->id,
                ]);
            }

        }
    }
}
