*/ 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; return [ 'picture_alt' => fake()->sentence(), 'picture_title' => fake()->sentence(), 'text' => \clean(\fake()->randomHtml(1, 1)), 'published' => $published, 'publish_at' => $publish_at, 'unpublish_at' => $unpublish_at, ]; } }