Sunan Ibn Majah, Book 35, Hadith 29 (In-Book) ⓘ
It was narrated from Abu Musa that the Prophet said: “In a dream I saw myself emigrating from Makkah to a land in which there were date-palm trees, and I thought that it was Yamamah or Hajar, but it was Al-Madinah, Yathrib. And I saw in this dream of mine that I was wielding a sword then it broke in the middle. That was what befell the believers on the Day of Uhud. Then I wielded it again and it was better than it had been before, and that is what Allah brought about of the Conquest and the regrouping of the believers. And I also saw cows, and by Allah it is good, for they are the group of the believers (who were martyred) on the Day of Uhud, and the goodness is that which Allah brought forth after that, and the reward of the truth which Allah brought us on the Day of Badr.”
حَدَّثَنَا مَحْمُودُ بْنُ غَيْلاَنَ، حَدَّثَنَا أَبُو أُسَامَةَ، حَدَّثَنَا بُرَيْدٌ، عَنْ أَبِي بُرْدَةَ، عَنْ أَبِي مُوسَى، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ " رَأَيْتُ فِي الْمَنَامِ أَنِّي أُهَاجِرُ مِنْ مَكَّةَ إِلَى أَرْضٍ بِهَا نَخْلٌ فَذَهَبَ وَهَلِي إِلَى أَنَّهَا يَمَامَةُ أَوْ هَجَرٌ فَإِذَا هِيَ الْمَدِينَةُ يَثْرِبُ وَرَأَيْتُ فِي رُؤْيَاىَ هَذِهِ أَنِّي هَزَزْتُ سَيْفًا فَانْقَطَعَ صَدْرُهُ فَإِذَا هُوَ مَا أُصِيبَ مِنَ الْمُؤْمِنِينَ يَوْمَ أُحُدٍ ثُمَّ هَزَزْتُهُ فَعَادَ أَحْسَنَ مَا كَانَ فَإِذَا هُوَ مَا جَاءَ اللَّهُ بِهِ مِنَ الْفَتْحِ وَاجْتِمَاعِ الْمُؤْمِنِينَ وَرَأَيْتُ فِيهَا أَيْضًا بَقَرًا وَاللَّهُ خَيْرٌ فَإِذَا هُمُ النَّفَرُ مِنَ الْمُؤْمِنِينَ يَوْمَ أُحُدٍ وَإِذَا الْخَيْرُ مَا جَاءَ اللَّهُ بِهِ مِنَ الْخَيْرِ بَعْدُ وَثَوَابِ الصِّدْقِ الَّذِي آتَانَا اللَّهُ بِهِ يَوْمَ بَدْرٍ " .
also referenced under: Hadith 3921 (Reference) & Volume 5, Book 35, Hadith 3921 (DarusSalam)