*/ public function definition() { $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; $title = fake()->unique()->slug(3); return [ 'title' => Str::of($title)->replace('-', ' ')->title(), 'slug' => Str::slug($title), 'seo_title' => fake()->sentence(), 'seo_description' => fake()->sentence(), 'picture_alt' => fake()->sentence(), 'picture_title' => fake()->sentence(), 'text' => \clean(\fake()->randomHtml(1, 1)), 'published' => $published, 'publish_at' => $publish_at, 'unpublish_at' => $unpublish_at, ]; } }