Section 8. A city, or a town which accepts chapter thirty-one or has accepted corresponding provisions of earlier laws, may appropriate money for the enforcement therein of the laws relating to its civil service.