Municipal corporations shall have power to make and publish bylaws and ordinances, not inconsistent with the laws of this state, which, as to them, shall seem necessary to provide for the safety, preserve the health, promote the prosperity, and improve the morals, order, comfort, and convenience of such corporations and the inhabitants thereof.