When the Prophet ﷺ placed the deceased in the grave, and Abu Khalid once said, "when the deceased was placed in his grave," he would sometimes say, "In the name of Allah, by Allah, and upon the religion of the Messenger of Allah," and at other times he would say, "In the name of Allah, by Allah, and upon the way of the Messenger of Allah ﷺ."
حدثنا أبو سعيد الأشج حدثنا أبو خالد الأحمر حدثنا الحجاج عن نافع
أن النبي ﷺ كان إذا أدخل الميت القبر وقال أبو خالد مرة إذا وضع الميت في لحده قال مرة بسم الله وبالله وعلى ملة رسول الله وقال مرة بسم الله وبالله وعلى سنة رسول الله ﷺ
[Sahih] Ibn Majah also narrated it in the Book of Funerals, chapter on what has been said about lowering the deceased into the grave, hadith no. 1550, from Abu Saeed Ashaj, with the same wording.Hajjaj is Ibn Artah, and the hadith has corroborating narrations in Ibn Majah, hadith no. 1550, and Abu Dawud, hadith no. 3213, and others.