To begin, place the soaked cod in a saucepan with bay leaves. Cover with water, bring to a gentle simmer, and cook for 8–10 minutes until the flesh flakes easily. Drain, discard bay leaves, and flake into bite sized pieces, removing any bones or skin. Move to potato preparation.
In a large frying pan, heat half the olive oil over medium heat. Fry the potato cubes until golden on the outside and almost cooked through. Drain on kitchen paper. Transition to cooking the onions.
Add the remaining olive oil to the same pan. Sauté the sliced onions and garlic over low heat until soft and lightly caramelised, around 8–10 minutes. Avoid high heat to preserve sweetness. Move to making the sauce.
In a medium saucepan, melt the butter over low heat. Stir in the flour and cook for 2–3 minutes, whisking continuously to remove any raw taste. Gradually whisk in the warm milk, then add the cream. Continue whisking until smooth and thickened.
Add nutmeg, salt, and white pepper to the sauce. Taste and adjust seasoning, keeping in mind that the cod may still carry a light saltiness. Transition to combining the components.
In a large mixing bowl, gently combine the flaked cod, fried potatoes, and sautéed onions. Pour over two thirds of the sauce and fold together carefully to avoid breaking the fish. Move to assembly.
Preheat your oven to 190°C (fan 170°C). Transfer the mixture to a buttered baking dish. Spread the remaining sauce evenly over the top. Sprinkle with grated cheese if using.
Place the dish in the oven and bake for 20–25 minutes until the surface is bubbling and golden. The cheese, if used, should melt into a light crust. Transition to garnishing.
Sprinkle with chopped fresh parsley before serving. Traditionally enjoyed with a crisp green salad or steamed vegetables. Serve immediately for the best contrast of textures.