*/ class ClassificationFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => $this->faker->unique()->sentence(2), 'description' => $this->faker->paragraph(), 'is_active' => IsActive::ACTIVE, ]; } public function active(): static { return $this->state(fn (array $attributes) => [ 'is_active' => IsActive::ACTIVE, ]); } public function inactive(): static { return $this->state(fn (array $attributes) => [ 'is_active' => IsActive::INACTIVE, ]); } }