*/ class VatRateFactory extends Factory { protected $model = VatRateModel::class; /** * @return array */ public function definition(): array { return [ 'name' => fake()->unique()->words(2, true), 'basis_points' => fake()->randomElement([0, 1000, 1350, 2550]), 'is_default' => false, 'is_active' => true, 'sort_order' => fake()->unique()->numberBetween(100, 100000), ]; } public function inactive(): static { return $this->state(fn (): array => ['is_active' => false]); } }