Trim and finely slice the leeks, peel and finely slice the shallot and pick the thyme leaves. Roughly chop the ham.
Melt the butter in a pan and sauté the leeks and shallot with half the thyme leaves for 5 minutes, until soft but not coloured – add a splash of water if it starts to stick. Set aside.
Cut the broccoli stalks into 3cm lengths and slice the larger florets in half. Blanch in boiling salted water for about 3 minutes, then drain well.
Lightly brush a 26cm round quiche tin with a little of the oil, then drape a layer of filo pastry over it, very gently pressing it into the corners, leaving a few centimetres overhanging.
Brush the filo with a little more oil, scatter over some of the remaining thyme leaves and layer another piece of filo on top. Repeat layering the oil, thyme and filo until you have a fully lined quiche base – around 4 filo sheets. Bake the case in the oven for 3 to 5 minutes, until just starting to colour.
Stir the broccoli and smoked ham through the leek mixture, then spoon the filling over the pastry base.
Beat the eggs and milk with a pinch of black pepper, then grate in ¾ of the cheese. Pour it over the veg and ham, grate over the rest of the cheese, then place it on a baking tray and bake for 25 to 30 minutes, or until cooked through.
Remove from the oven and leave to stand for 15 minutes before serving with a green salad.
To get the quiche out in one piece, take care when layering your filo, and leave it to cool in the tin.