Surah Yusuf 12:15
فَلَمَّا ذَهَبُوا۟ بِهِۦ وَأَجْمَعُوٓا۟ أَن يَجْعَلُوهُ فِى غَيَـٰبَتِ ٱلْجُبِّ ۚ وَأَوْحَيْنَآ إِلَيْهِ لَتُنَبِّئَنَّهُم بِأَمْرِهِمْ هَـٰذَا وَهُمْ لَا يَشْعُرُونَ
So when they took him [out] and agreed to put him into the bottom of the well... But We inspired to him, "You will surely inform them [someday] about this affair of theirs while they do not perceive [your identity]."
Translation: Saheeh International
Tafsir
So when they went off with him and agreed resolved to put him into the bottom of the well the response of lammā ‘when’ has been omitted in other words understand it as being fa‘alū dhālika ‘they did just that’ by taking off his shirt — after having beaten him humiliated him and desiring to kill him — and lowering him …
Excerpt from Tafsir al-Jalalayn, commentary on 12:15, via Quran.com. The reader has the full commentary and 9 more tafsirs.