Riyad as-Salihin, Book 1, Hadith 4 (In-Book)

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."

وعن أبي عبد الله جابر بن عبد الله الأنصارى رضي الله عنهما قال‏:‏ كنا مع النبي صلى الله عليه وسلم في غزاةٍ فقال‏:‏ ‏"‏إن بالمدينة لرجالاً ماسرتم مسيراً، ولا قطعتم وادياً إلا كانوا معكم حبسهم المرض‏"‏ وفى رواية‏:‏ ‏"‏إلا شاركوكم في الأجر‏"‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏ ‏(‏‏(‏ورواه البخاري‏)‏‏)‏ عن أنس رضي الله عنه قال‏:‏ رجعنا من غزوة تبوك مع النبي صلى الله عليه وسلم فقال‏:‏ ‏"‏ إن أقواماً خلفنا بالمدينة ما سلكنا شعباً ولا وادياً إلا وهم معنا، حبسهم العذر‏"‏‏.‏

sunnah.com