*/ public function definition(): array { return [ 'slug' => $this->faker->unique()->lexify('test-page-??????'), 'title' => [ 'ko' => $this->faker->sentence(3), 'en' => $this->faker->sentence(3), ], 'content' => [ 'ko' => $this->faker->paragraphs(2, true), 'en' => $this->faker->paragraphs(2, true), ], 'content_mode' => 'html', 'published' => false, 'published_at' => null, 'seo_meta' => null, 'current_version' => 1, 'created_by' => User::factory(), 'updated_by' => User::factory(), ]; } /** * 발행 상태로 설정 * * @return static */ public function published(): static { return $this->state(fn (array $attributes) => [ 'published' => true, 'published_at' => now(), ]); } /** * SEO 메타 정보 포함 * * @return static */ public function withSeoMeta(): static { return $this->state(fn (array $attributes) => [ 'seo_meta' => [ 'title' => $this->faker->sentence(5), 'description' => $this->faker->sentence(10), 'keywords' => implode(',', $this->faker->words(5)), ], ]); } }