01 -
Preheat the oven to 175°C (350°F). Grease and flour two 9-inch cake pans or line with parchment paper.
02 -
In a bowl, whisk together flour, baking soda, baking powder, cinnamon, and salt. Set aside.
03 -
In a large bowl, whisk together granulated sugar, brown sugar, eggs, 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, being careful not to overmix. 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 10 minutes, then 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, as desired.