<?php

/** @var Factory $factory */

use App\PageDescription;
use Faker\Generator as Faker;
use Illuminate\Database\Eloquent\Factory;
use \App\Page;
use \App\Language;

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