*/ class ArticleFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $publishDate = Carbon::parse($this->faker->dateTimeBetween('-1 month', '+1 month')); return [ 'title' => $this->faker->sentence(), 'slug' => $this->faker->slug(), 'publish_at' => $publishDate, 'content' => $this->faker->paragraphs(3, true), 'user_id' => $this->faker->uuid(), 'hero' => $this->faker->uuid(), ]; } }