are platypus the only mammals that lay eggs
No - The four extant species of echidnas also lay eggs.
Echidna
The four extant species of echidnas and the platypus are the only living mammals that lay eggs and the only surviving members of the order Monotremata.
wiki:13477362
Echidna [SEP] Introduction
Echidnas (), sometimes known as spiny anteaters, belong to the family Tachyglossidae in the monotreme order of egg-laying mammals. The four extant species of echidnas and the platypus are the only living mammals that lay eggs and the only surviving members of the order Monotremata. The diet of some species consists of ants and termites, but they are not closely related to the true anteaters of the Americas, which are xenarthrans, along with sloths and armadillos. Echidnas live in Australia and New Guinea. Echidnas evolved between 20 and 50 million years ago, descending from a platypus-like monotreme. This ancestor was aquatic, but echidnas adapted to life on land.