as below. Narrated Abu Qatada: The Prophet ﷺ said, "A good dream is from Allah, and a bad or evil dream is from Satan; so if anyone of you has a bad dream of which he gets afraid, he should spit on his left side and should seek Refuge with Allah from its evil, for then it will not harm him."
عَنِ النَّبِيِّ ﷺ حَدَّثَنِي سُلَيْمَانُ بْنُ عَبْدِ الرَّحْمَنِ حَدَّثَنَا الْوَلِيدُ حَدَّثَنَا الأَوْزَاعِيُّ قَالَ حَدَّثَنِي يَحْيَى بْنُ أَبِي كَثِيرٍ قَالَ حَدَّثَنِي عَبْدُ اللَّهِ بْنُ أَبِي قَتَادَةَ عَنْ أَبِيهِ قَالَ قَالَ النَّبِيُّ ﷺ الرُّؤْيَا الصَّالِحَةُ مِنَ اللَّهِ وَالْحُلُمُ مِنَ الشَّيْطَانِ فَإِذَا حَلَمَ أَحَدُكُمْ حُلُمًا يَخَافُهُ فَلْيَبْصُقْ عَنْ يَسَارِهِ وَلْيَتَعَوَّذْ بِاللَّهِ مِنْ شَرِّهَا فَإِنَّهَا لاَ تَضُرُّهُ