The Messenger of Allah ﷺ said, "When one of you goes to relieve himself, he should neither face the qiblah nor turn his back to it. Rather, let him face east or west."Abu Ayub said, "When we came to Sham, we found that the latrines had been built facing the qiblah, so we would turn aside and ask Allah's forgiveness."
حدثنا عبد الرزاق حدثنا معمر عن الزهري عن عطاء بن يزيد الليثي
قال رسول الله ﷺ إذا أتى أحدكم الغائط فلا يستقبل القبلة ولا يستدبرها ولكن ليشرق أو ليغرب قال أبو أيوب فلما قدمنا الشام وجدنا مراحيض جعلت نحو القبلة فننحرف ونستغفر الله