A referendum on Catalan independence passed this month despite opposition from the Spanish government.