Abdullah bin Abbas reported,

The Messenger of Allah ﷺ traveled during Ramadan and fasted until he reached Usfan. Then he called for a vessel containing a drink and drank it during the day so that the people could see him, and he broke his fast until he entered Mecca.Ibn Abbas رضي الله عنهم said, "The Messenger of Allah ﷺ both fasted and broke his fast, so whoever wishes may fast and whoever wishes may break his fast."

Muslim 2608

Sahih

و حدثنا إسحق بن إبراهيم أخبرنا جرير عن منصور عن مجاهد عن طاوس

عن ابن عباس رضي الله عنهما قال

سافر رسول الله ﷺ في رمضان فصام حتى بلغ عسفان ثم دعا بإناء فيه شراب فشربه نهارا ليراه الناس ثم أفطر حتى دخل مكة قال ابن عباس رضي الله عنهما فصام رسول الله ﷺ وأفطر فمن شاء صام ومن شاء أفطر

مسلم 2608صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Fasting
Chapter
Permissibility of fasting and breaking the fast in Ramadan for a traveler not in disobedience when his journey is two stages or more, and that it is better for one who can bear it without harm to fast and for one who finds it difficult to break the fast
Numbering
Darussalam 2608
Muslim 2608