Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:21:84

So We responded to him and removed what afflicted him of adversity. And We gave him ˹back˺ his family and the like thereof with them as mercy from Us and a reminder for the worshippers ˹of Allah˺.  

So We responded to him, in his call, and removed the harm that had befallen him, and We gave him ˹back˺ his family, his male and female children, by bringing them back to life — of each sex there were three or seven along with them ˹other children˺ the like of them, from his wife, for she was made younger. He had also possessed a threshing floor for wheat and another for barley, so God sent two clouds and one of them poured forth gold onto the wheat threshing floor and the other poured forth silver onto the barley threshing floor, until they overflowed; as a mercy (rahmatan, a direct object denoting reason) from Us (min ‘indinā, an adjectival phrase) and a reminder to worshippers, that they be patient and thus be rewarded ˹by God˺.
القرآن:٢١:٨٤

فَاسْتَجَبْنَا لَهُ فَكَشَفْنَا مَا بِهِ مِنْ ضُرٍّ ۖ وَآتَيْنَاهُ أَهْلَهُ وَمِثْلَهُمْ مَعَهُمْ رَحْمَةً مِنْ عِنْدِنَا وَذِكْرَىٰ لِلْعَابِدِينَ  

{فاستجبنا له} نداءه {فكشفنا ما به من ضر وآتيناه أهله} أولاده الذكور والإناث بأن أحيوا له وكل من الصنفين ثلاث أو سبع {ومثلهم معهم} من زوجته وزيد في شبابها، وكان له أندر للقمح وأندر للشعير فبعث الله سحابتين أفرغت إحداهما على أندر القمح الذهب وأفرغت الأخرى على أندر الشعير الورق حتى فاض {رحمة} مفعول له {من عندنا} صفة {وذكرى للعابدين} ليصبروا فيثابوا.