Thomas Aquinas said this quote

Law is nothing other than a certain ordinance of reason for the common good, promulgated by the person who has the care of the community.