Abdullah bin Umar reported,

Whenever the Messenger of Allah ﷺ went out on the day of Eid, he would order a spear to be brought and placed in front of him. He would then pray facing it, with the people praying behind him. He used to do this while traveling, and from that practice the rulers adopted it.

Bukhari 494

Sahih

حدثنا إسحاق يعني ابن منصور قال حدثنا عبد الله بن نمير قال حدثنا عبيد الله بن عمر عن نافع

عن ابن عمر

أن رسول الله ﷺ كان إذا خرج يوم العيد أمر بالحربة فتوضع بين يديه فيصلي إليها والناس وراءه وكان يفعل ذلك في السفر فمن ثم اتخذها الأمراء

البخاري 494صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Prayer
Chapter
Imam's sutrah is the sutrah for those behind him
Numbering
Darussalam 494
Bukhari 494