Prepare the leeks, reserving the trimmings. Slice the leeks into 2 - 3 cm rounds and give them a good wash. Bring a pan of salted water to the boil and add the leeks. Cook for 3 - 4 minutes, or until the leeks are tender. Drain the leeks and set aside.
Place the reserved leek tops in a saucepan with the milk and the thyme. Bring slowly to a simmer, then remove from the heat and leave to infuse for 15–20 minutes. Strain and discard the leek tops.
In another pan, melt the butter over a medium heat. Stir in the flour to make a smooth roux and cook for a minute or two. Gradually add the warm infused milk, whisking constantly until you have a smooth, thick sauce. Season with salt and pepper, then stir in most of the cheese, keeping a handful aside for the top.
Stir the cooked leeks into the white sauce and gently stir together. Turn the mixture out into a suitably sized oven dish.
In a small bowl, mix the breadcrumbs with the chopped onion, reserved cheese and rosemary. Season lightly and scatter over the leeks. trickle over 1 Tbls of olive oil then slide into a hot oven (around 200°C / 180°C fan) and bake for 25–30 minutes, until bubbling and golden on top.
Let it rest for a few minutes before serving — it’s lovely with roast chicken, sausages, or just a simple green salad and crusty bread.