*/ class ArticleFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'feed_id' => \App\Models\Feed::factory(), 'url' => $this->faker->url(), 'title' => $this->faker->sentence(), 'description' => $this->faker->paragraph(), 'content' => $this->faker->paragraphs(3, true), 'image_url' => $this->faker->optional()->imageUrl(), 'published_at' => $this->faker->optional()->dateTimeBetween('-1 month', 'now'), 'author' => $this->faker->optional()->name(), 'approval_status' => $this->faker->randomElement(['pending', 'approved', 'rejected']), ]; } }