*/ class DepartmentFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => fake()->unique()->companySuffix(), 'is_active' => true, 'department_profile_id' => DepartmentProfile::factory(), ]; } /** * Indicate that the department is inactive. */ public function inactive(): static { return $this->state(fn (array $attributes) => [ 'is_active' => false, ]); } }