Following several weeks of heavy fighting with militants, the Syrian army has taken full control of a strategic town near Aleppo in the north of the country.