*/ class PortfolioCaseFactory extends Factory { protected $model = PortfolioCase::class; /** * @return array */ public function definition(): array { $title = fake()->unique()->words(4, true); return [ 'title' => $title, 'slug' => str($title)->slug()->toString(), 'summary' => fake()->sentence(), 'event_type' => 'Casamento', 'city' => 'São Paulo', 'venue' => fake()->company(), 'event_date' => fake()->date(), 'challenge' => fake()->paragraph(), 'solution' => fake()->paragraph(), 'result' => fake()->paragraph(), 'cover_image_path' => 'content/fixture-cover.jpg', 'cover_image_alt' => 'Capa do caso', 'is_featured' => false, 'sort_order' => 0, 'published_at' => null, 'meta_title' => null, 'meta_description' => null, ]; } public function published(): static { return $this->state(fn (array $attributes): array => [ 'published_at' => now(), ]); } }