User::factory(), 'status' => UserOrder::STATUS_PENDING, 'amount' => $this->faker->numberBetween(100, 50000), ]; } public function completed(): static { return $this->state(fn (array $attributes) => [ 'status' => UserOrder::STATUS_COMPLETED, ]); } public function cancelled(): static { return $this->state(fn (array $attributes) => [ 'status' => UserOrder::STATUS_CANCELLED, ]); } }