<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\ArticleDescription;
use App\Language;
use App\Article;
use Faker\Generator as Faker;

$factory->define(ArticleDescription::class, function (Faker $faker) {
    return [
        'title' => $faker->name,
        'description' => $faker->sentence,
        'slug' => $faker->unique()->name,
        'meta_description' => $faker->sentence,
        'keywords' => $faker->unique()->sentence,
        'article_id' => factory(Article::class)->create()->id,
        'language_id' => Language::firstOrCreate(['local'=> getCurrentLocale(), 'name'=> \LaravelLocalization::getCurrentLocaleName()])->id,
    ];
});
