01 -
Preheat the oven to 350°F (175°C). Grease and flour two 9-inch round cake pans or line them with parchment paper.
02 -
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, nutmeg, and salt. Set aside.
03 -
In a large bowl, whisk the eggs, granulated sugar, and brown sugar together until smooth and slightly fluffy, about 3-4 minutes.
04 -
Add the vegetable oil and vanilla extract to the egg mixture, whisking until fully combined. Slowly add the dry ingredients to the wet ingredients, mixing until just combined. Be careful not to overmix.
05 -
Stir in the grated carrots, crushed pineapple (if using), walnuts, and raisins (if using). The batter will be thick, which is normal.
06 -
Divide the batter evenly between the prepared cake pans and smooth the tops.
07 -
Bake for 30-35 minutes, or until a toothpick inserted into the center comes out clean. Let the cakes cool in the pans for 10 minutes before transferring them to a wire rack to cool completely.
08 -
Beat the softened cream cheese and butter together in a medium bowl until smooth and creamy, about 3-4 minutes. Gradually add the powdered sugar, one cup at a time, continuing to beat until smooth and fluffy. Stir in the vanilla extract and a pinch of salt.
09 -
Once the cakes have completely cooled, spread a generous layer of frosting on the top of the first cake layer. Place the second layer on top and frost the top and sides of the entire cake. Optionally, garnish with extra chopped walnuts or shredded coconut.