Sahih Muslim 4674
The Book of Jihad and Expeditions
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالَ ابْنُ الْمُثَنَّى حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، أَخْبَرَنَا شُعْبَةُ، عَنْ قَتَادَةَ، حَدَّثَنَا أَنَسُ بْنُ مَالِكٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ يَقُولُ " اللَّهُمَّ إِنَّ الْعَيْشَ عَيْشُ الآخِرَةِ " . قَالَ شُعْبَةُ أَوْ قَالَ " اللَّهُمَّ لاَ عَيْشَ إِلاَّعَيْشُ الآخِرَهْ فَأَكْرِمِ الأَنْصَارَ وَالْمُهَاجِرَهْ " .
According to another version of the tradition, reported on the authority of Anas b. Malik, the Messenger of Allah (may peace he upon him) is reported to have said:O God, there is no life but the life of the Hereafter, So grant honour to the Ansar and the Muhajirs
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.