*/ class ServiceUnitFactory extends Factory { protected $model = ServiceUnitModel::class; /** * @return array */ public function definition(): array { return [ 'name' => fake()->unique()->words(2, true), 'is_shared' => false, 'is_active' => true, 'sort_order' => fake()->unique()->numberBetween(100, 100000), ]; } public function inactive(): static { return $this->state(fn (): array => ['is_active' => false]); } }