So, when they took him away and they all agreed to throw him down to the bottom of the well, (they did so) and We revealed to him: “Indeed, you shall (one day) inform them of this their affair, when they know (you) not” (Quran, Surah Yousuf: 15).
We learn in later verses of the same surah that Prophet Yousuf later became the king of Egypt. Also, his brothers came to realize the truth of what they had done and their mistakes when they were all brought to Prophet Yousuf’s presence when he was the king. It was at this reunion with his family (when he was also the king of Egypt) that Prophet Yousuf made the following Dua of gratitude to Allah:
“My Lord! You have indeed bestowed on me of the sovereignty, and taught me something of the interpretation of dreams – the (Only) Creator of the heavens and the earth! You are my Wali (Protector, Helper, Supporter, Guardian, God, Lord.) in this world and in the Hereafter. Cause me to die as a Muslim (the one submitting to Your Will), and join me with the righteous” (Quran, Surah Yousuf: 101).
Let’s, therefore, stand firm in our times of hardship and pray to Allah to make things better later in life.
source : iqrasense.com