01 -
Preheat the oven to 350°F. Grease and flour two 9-inch round cake pans or line with parchment paper.
02 -
In a large bowl, whisk together all-purpose flour, baking soda, baking powder, cinnamon, and salt until evenly blended.
03 -
In another bowl, whisk together granulated sugar, brown sugar, eggs, vegetable oil, and vanilla extract until the mixture is smooth and homogenous.
04 -
Stir the grated carrots and drained crushed pineapple into the wet mixture until thoroughly distributed.
05 -
Gradually add the dry ingredients to the wet mixture, gently folding until just combined. Avoid overmixing to keep the cake moist.
06 -
If desired, fold in the chopped walnuts to evenly integrate into the batter.
07 -
Pour the batter evenly into the prepared pans and smooth the surface. Bake for 30 to 35 minutes, or until a toothpick inserted into the center comes out clean.
08 -
Allow the cakes to cool in their pans for 10 minutes before transferring to a wire rack to cool completely.
09 -
Beat cream cheese and softened butter together until creamy and smooth. Gradually add powdered sugar, beating until light and fluffy. Stir in vanilla extract and pineapple juice for enhanced flavor.
10 -
Place one cake layer on a serving plate and spread a layer of frosting over the top. Place the second layer over the first and apply frosting to the top and sides. Garnish with chopped walnuts or pineapple slices if desired.