Preheat the oven to 200C/400F/Gas 6. Line a large baking tray (or two smaller baking trays) with greaseproof paper.
Heat the oil in a small frying pan and gently fry the onion and garlic for 2–3 minutes until soft, stirring regularly. Tip the mixture into a large heatproof bowl and leave to cool for few minutes.
Add the minced beef, dried herbs, tomato purée and the flour to the bowl with the onion and season with salt and freshly ground black pepper. Mix with clean hands until thoroughly combined.
Lightly flour a clean surface with flour, and roll the puff pastry into a 34cm/13½in square.
Spread the mince mixture over the pastry, leaving a 2cm/¾in border around the edges. Sprinkle on the grated cheese, if using, and brush the pastry edges with a little of the beaten egg.
Firmly roll the pastry up, like a Swiss roll.
Cut the roll into 12 even slices using a serrated knife – a bread knife is ideal.
Place the pinwheels on the baking tray (or trays), spaced well apart to allow for rising. Flatten each pinwheel slightly with the palm of your hand. Brush the top of each pinwheel with the beaten egg to glaze, taking care not to allow the glaze to drip down the sides and onto the tray as this will make the pinwheels stick to the baking paper. Bake for 15 minutes or until well-risen and golden brown, and the beef is cooked through.
Allow to cool slightly, then remove from the baking paper using a palette knife. Best served warm.