01 -
Preheat oven to 175°C. Grease and flour two 23 cm round cake pans.
02 -
In a large bowl, whisk together flour, baking powder, baking soda, ground cinnamon, ground nutmeg, and salt.
03 -
In a separate bowl, combine granulated sugar, eggs, and vegetable oil. Beat until mixture is smooth.
04 -
Stir shredded carrots and drained crushed pineapple into the wet mixture until evenly distributed.
05 -
Gradually add dry ingredients to the wet mixture, mixing until just combined. Avoid overmixing.
06 -
If using, gently fold in chopped walnuts for texture.
07 -
Divide batter evenly between the prepared cake pans.
08 -
Bake for 30–35 minutes or until a toothpick inserted into the centre comes out clean.
09 -
Remove cakes from the oven and allow to cool in the pans for 10 minutes. Transfer to wire racks to cool completely.
10 -
In a medium bowl, beat softened cream cheese and butter until smooth. Gradually add powdered sugar and vanilla extract, mixing until frosting is fluffy. Add milk if necessary to adjust consistency.
11 -
Place one cake layer on a platter. Spread a layer of frosting on top. Position the second cake layer above, then frost top and sides evenly.