Abu Qatada reported Allah's Messenger (ﷺ) as saying:
The good vision are from Allah and the evil dreams are from the satan. If one sees a dream which one does not like, one should spit on one's left side and seek the refuge of Allah from the satan; it will not do one any harm, and one should not disclose it to anyone and if one sees a good vision one should feel pleased but should not disclose it to anyone but whom one loves. (AR)
Reference (AR): Sahih Muslim 2261 f (AR)
In-book reference (AR): Book 42, Hadith 6 (AR)
USC-MSA web (English) reference(deprecated numbering scheme): Book 29, Hadith 5618 (AR)