01 -
Preheat your oven to 175°C. Grease and flour two 9-inch cake pans or line them with parchment paper.
02 -
In a bowl, whisk together flour, baking soda, baking powder, cinnamon, and salt. Set aside.
03 -
Whisk together granulated sugar, brown sugar, eggs, vegetable oil, and vanilla extract until smooth. Add grated carrots and crushed pineapple, stirring until well combined.
04 -
Gradually mix the dry ingredients into the wet ingredients until just combined. Fold in chopped walnuts if using. Divide the batter between the prepared cake pans. Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean.
05 -
Let the cakes cool in the pans for about 10 minutes. Transfer them to a wire rack to cool completely before frosting.
06 -
Beat cream cheese and butter together until smooth. Gradually add powdered sugar and mix until fluffy. Stir in vanilla extract and pineapple juice for extra flavor.
07 -
Place one cake layer on a serving plate and spread with frosting. Add the second layer and frost the top and sides. Garnish with chopped walnuts or pineapple slices for decoration.