*/ class PostCategoryFactory extends Factory { protected $model = PostCategory::class; public function definition(): array { $name = $this->faker->unique()->words(2, true); return [ 'name' => Str::title($name), 'slug' => Str::slug($name), 'description' => $this->faker->sentence(), 'icon' => null, 'sort_order' => $this->faker->numberBetween(0, 10), 'status' => $this->faker->randomElement(['active', 'inactive']), ]; } }