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:28:82

And those who had wished for his position the previous day began to say, "Oh, how Allah extends provision to whom He wills of His servants and restricts it! If not that Allah had conferred favor on us, He would have caused it to swallow us. Oh, how the disbelievers do not succeed!"  

And those who had longed to be in his place the day before, that is, only recently, were saying, ‘Alas! God expands provision for whomever He will of His servants and straitens ˹it˺, He restricts it for whomever He will (way-ka’anna: way is a noun of action, with the sense of ‘How astonished I am’, while the kāf functions as a ˹causative˺ lām, ‘because’). Had God not been gracious to us, He would have made us to be swallowed too’ (read active la-khasafa, or passive la-khusifa). Lo! indeed those who are ungrateful, for God’s grace, such as Korah, never prosper.
القرآن:٢٨:٨٢

وَأَصْبَحَ الَّذِينَ تَمَنَّوْا مَكَانَهُ بِالْأَمْسِ يَقُولُونَ وَيْكَأَنَّ اللَّهَ يَبْسُطُ الرِّزْقَ لِمَنْ يَشَاءُ مِنْ عِبَادِهِ وَيَقْدِرُ ۖ لَوْلَا أَنْ مَنَّ اللَّهُ عَلَيْنَا لَخَسَفَ بِنَا ۖ وَيْكَأَنَّهُ لَا يُفْلِحُ الْكَافِرُونَ  

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