<?php

/** @var Factory $factory */

use App\Language;
use App\Slider;
use App\SliderDescription;
use Faker\Generator as Faker;
use Illuminate\Database\Eloquent\Factory;

$factory->define(SliderDescription::class, function (Faker $faker) {
    return [
        'name' => $faker->sentence,
        'slug' => $faker->unique()->slug(1),
        'website_category_id' => factory(Slider::class)->create()->id,
        'language_id' => Language::firstOrCreate(['local'=> getCurrentLocale(), 'name'=> \LaravelLocalization::getCurrentLocaleName()])->id,
    ];
});
