Abu Hurairah (May Allah be pleased with him) reported:
One of the Prophet's Companions came upon a valley containing a rivulet of fresh water and was delighted by it. He reflected: 'I wish to withdraw from people and settle in this valley; but I won't do so without the permission of the Messenger of Allah (ﷺ).' This was mentioned to the Messenger of Allah (ﷺ) and he said (to the man), "Do not do that, for when any of you remains in Allah's way, it is better for him than performing Salat (prayer) in his house for seventy years. Do you not wish that Allah should forgive you and admit you to Jannah? Fight in Allah's way, for he who fights in Allah's Cause as long as the time between two consecutive turns of milking a she-camel, will be surely admitted to Jannah."[At-Tirmidhi].
App reference: Book 12, Hadith 13
Arabic/English book reference: Book 12, Hadith 1297