*/ public function definition() { $title = fake()->sentence(); $publish_at = now()->subDays(rand(1, 30)); $unpublish_at = $publish_at->copy()->addDays(rand(1, 30)); $published = now() > $publish_at && now() < $unpublish_at ? true : false; return [ 'seo_title' => fake()->word(), 'seo_description' => fake()->text(160), 'title' => $title, 'slug' => Str::slug($title), 'category' => \collect(CategoryEnum::cases())->random(), 'picture_thumbnail_alt' => fake()->sentence(), 'picture_thumbnail_title' => fake()->sentence(), 'picture_alt' => fake()->sentence(), 'picture_title' => fake()->sentence(), 'subtitle' => fake()->sentence(), 'content' => \clean(\fake()->randomHtml(6, 7)), 'published' => $published, 'publish_at' => $publish_at, 'unpublish_at' => $unpublish_at, ]; } }