Hadithcore
Sahih Muslim, 689 b
sahih

Hafs b. 'Asim reported:

I fell ill and lbn 'Umar came to inquire after my health, and I asked him about the glorification of Allah (i. e. prayer) while travelling. Thereupon he said: I accompanied the Messenger of Allah (ﷺ) on a journey but I did not see him glorifying Him, and were I to glorify (Him). I would have completed the prayer. Allah, the Exalted, has said:" Verily there is a model pattern for you in the Messenger of Allah."

حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا يَزِيدُ، - يَعْنِي ابْنَ زُرَيْعٍ - عَنْ عُمَرَ بْنِ مُحَمَّدٍ، عَنْ حَفْصِ بْنِ عَاصِمٍ، قَالَ مَرِضْتُ مَرَضًا فَجَاءَ ابْنُ عُمَرَ يَعُودُنِي قَالَ وَسَأَلْتُهُ عَنِ السُّبْحَةِ، فِي السَّفَرِ فَقَالَ صَحِبْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم فِي السَّفَرِ فَمَا رَأَيْتُهُ يُسَبِّحُ وَلَوْ كُنْتُ مُسَبِّحًا لأَتْمَمْتُ وَقَدْ قَالَ اللَّهُ تَعَالَى ‏{‏ لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ إِسْوَةٌ حَسَنَةٌ‏}‏

References2 variants
In-Book Reference
Book 6, Hadith 11
USC-MSA web (English) reference
Book 4, Hadith 1468 (deprecated numbering scheme)