*/ class PageFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'slug' => fake()->unique()->slug(2), 'title_ar' => fake()->sentence(3), 'title_en' => fake()->sentence(3), 'content_ar' => '

'.fake()->paragraphs(3, true).'

', 'content_en' => '

'.fake()->paragraphs(3, true).'

', ]; } public function terms(): static { return $this->state(fn (array $attributes) => [ 'slug' => 'terms', 'title_ar' => 'شروط الخدمة', 'title_en' => 'Terms of Service', ]); } public function privacy(): static { return $this->state(fn (array $attributes) => [ 'slug' => 'privacy', 'title_ar' => 'سياسة الخصوصية', 'title_en' => 'Privacy Policy', ]); } }