Jabir bin Abdullah Al-Ansari (May Allah be pleasedwith them) reported:
We accompanied the Prophet (ﷺ) in an expedition when he said, "There are some men in Al-Madinah who are with you wherever you march and whichever valley you cross. They have not joined you in person because of their illness." In another version he said: "They share the reward with you."[Muslim].It is narrated by Bukhari from Anas bin Malik (May Allah be pleased with him): We were coming back from the battle of Tabuk with the Prophet (ﷺ) when he remarked, "There are people whom we left behind in Al- Madinah who accompanied us in spirit in every pass and valley we crossed. They remained behind for a valid excuse."
Arabic/English book reference: Book 1, Hadith 4