We said, or they said, "Messenger of Allah, you have commanded us to send blessings upon you and to send greetings of peace upon you. As for the greeting of peace, we know it. So how do we send blessings upon you?"He replied, "Say, 'O Allah, send blessings upon Muhammad and the family of Muhammad, just as You sent blessings upon Ibrahim, and bestow Your favor upon Muhammad and the family of Muhammad, just as You bestowed Your favor upon the family of Ibrahim. Indeed, You are Praiseworthy, Glorious.'"
حدثنا حفص بن عمر حدثنا شعبة عن الحكم عن ابن أبي ليلى
قلنا أو قالوا يا رسول الله أمرتنا أن نصلي عليك وأن نسلم عليك فأما السلام فقد عرفناه فكيف نصلي عليك قال قولوا اللهم صل على محمد وآل محمد كما صليت على إبراهيم وبارك على محمد وآل محمد كما باركت على آل إبراهيم إنك حميد مجيد
Bukhari narrated it in "Invocations," chapter on prayer upon the Prophet, hadith no. 6357, and Muslim narrated it in "Prayer," chapter on prayer upon the Prophet after the tashahhud, hadith no. 406, both from the hadith of Shubah, with the same chain.