have the laugh on one's side

Verb

 * 1) To be able to laugh at another person through having got the better of them.