Sayyiduna Abdullah bin Amr (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) set out for Badr with three hundred and fifteen men, just as Talut (Saul) had set out. the Messenger of Allah (peace and blessings be upon him) supplicated for them; when they set out, he (peace and blessings be upon him) said: "Allahumma innahum hufatun fa-hmilhum, Allahumma innahum uratun fa-ksuhum, Allahumma innahum jiya'un fa-ashbi'hum (O Allah, they are barefoot without mounts, so give them mounts; O Allah, they are unclothed, so clothe them; O Allah, they are hungry, so fill them)." Allah Almighty granted them victory on the day of Badr, and when they returned, every man came back with one or two camels; they were clothed and their hunger was satisfied.
Imam al-Shafi'i (may Allah have mercy on him) said: According to the narration of Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him), the spoils of Badr that the Muslims obtained were taken before the verse of Surah al-Anfal was revealed. When they disputed, Allah Almighty took it away from them: "They ask you about the spoils of war. Say: The spoils of war belong to Allah and the Messenger." [Surah al-Anfal: 1]
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17984