The Messenger of Allah ﷺ said, "Whichever town you come to and settle in, your share is in it. And whichever town disobeys Allah and His Messenger, then a fifth of its spoils belongs to Allah and His Messenger, and the rest is yours."
قال رسول الله ﷺ: أيما قرية أتيتموها وأقمتم فيها فسهمكم فيها وأيما قرية عصت الله ورسوله فإن خمسها لله ولرسوله ثم هي لكم.
Muslim narrated it in the Book of Jihad and Expeditions (1756) through two routes from Abdul-Razzaq, who said, Mamar told us, from Hammam bin Munabbih, who said, This is what Abu Hurairah told us from the Messenger of Allah ﷺ, and he mentioned several hadiths, among them, and he said, and then he narrated it.