There is one story about Prophet Muhammad with his companions which is narrated by Abu Huraira (May Allah be pleased with him).
Abu Huraira said: “By Allah except Whom none has the right to be worshipped, (sometimes) I used to lay (sleep) on the ground on my liver (abdomen) because of hunger, and (sometimes) I used to bind a stone over my belly because of hunger.
One day I sat by the way from where they (the Prophet (ﷺ) and his companions) used to come out. When Abu Bakr passed by, I asked him about a Verse from Allah’s Book and I asked him only that he might satisfy my hunger, but he passed by and did not do so. Then `Umar passed by me and I asked him about a Verse from Allah’s Book, and I asked him only that he might satisfy my hunger, but he passed by without doing so. Finally, Abu-l-Qasim (the Prophet (ﷺ) ) passed by me and he smiled when he saw me, for he knew what was in my heart and on my face. He said, “O Aba Hirr (Abu Huraira)!” I replied, “Labbaik, O Allah’s Messenger (ﷺ)!” He said to me, “Follow me.”
He left and I followed him. Then he entered the house and I asked permission to enter and was admitted. He found milk in a bowl and said, “From where is this milk?” They said, “It has been presented to you by such-and-such man (or by such and such woman).” He said, “O Aba Hirr!” I said, “Labbaik, O Allah’s Messenger (ﷺ)!” He said, “Go and call the people of Suffa to me.”
These people of Suffa were the guests of Islam who had no families, nor money, nor anybody to depend upon, and whenever an object of charity was brought to the Prophet, he would send it to them and would not take anything from it, and whenever any present was given to him, he used to send some for them and take some of it for himself. The order of the Prophet upset me, and I said to myself, “How will this little milk be enough for the people of As- Suffa? though I was more entitled to drink from that milk in order to strengthen myself”, but behold! The Prophet (ﷺ) came to order me to give that milk to them.
I wondered what will remain of that milk for me, but anyway, I could not but obey Allah and His Apostle so I went to the people of As-Suffa and called them, and they came and asked the Prophet’s permission to enter. They were admitted and took their seats in the house. The Prophet (ﷺ) said, “O Aba-Hirr!” I said, “Labbaik, O Allah’s Messenger (ﷺ)!” He said, “Take it and give it to them.” So I took the bowl (of milk) and started giving it to one man who would drink his fill and return it to me, whereupon I would give it to another man who, in his turn, would drink his fill and return it to me, and I would then offer it to another man who would drink his fill and return it to me. Finally, after the whole group had drunk their fill, I reached the Prophet (ﷺ) who took the bowl and put it on his hand, looked at me and smiled and said. “O Aba Hirr!” I replied, “Labbaik, O Allah’s Messenger (ﷺ)!” He said, “There remain you and I.” I said, “You have said the truth, O Allah’s Messenger (ﷺ)!” He said, “Sit down and drink.” I sat down and drank. He said, “Drink,” and I drank. He kept on telling me repeatedly to drink, until I said, “No. by Allah Who sent you with the Truth, I have no space for it (in my stomach).” He said, “Hand it over to me.” When I gave him the bowl, he praised Allah and pronounced Allah’s Name on it and drank the remaining milk.
This story showed one of the miracles that bestow upon our beloved prophet from Allah, and he showed a miracle happen when we share what we have.
Source: Sahih al-Bukhari, hadith no. 6452