First things first, preheat your oven to 350°F (175°C) and grease the two cake pans. You can also line the bottom with parchment paper for easy removal.
In a mixing bowl, combine the flour, baking soda, baking powder, cinnamon, nutmeg, and salt. Give it a good whisk to make sure everything is evenly mixed.
In another bowl, beat the eggs and sugar together until they're well combined. Gradually add the oil and vanilla extract while continuing to mix.
Now, fold in the grated carrots, crushed pineapple, and chopped walnuts (if you're using them). These elements will give your cake its signature flavor and texture.
Gently add the dry mixture into the wet mixture, stirring until just combined. Be careful not to overmix, as this can lead to a dense cake.
Divide the batter evenly between the prepared cake pans. Smooth the tops with a spatula, ensuring they're level for even baking. Pop them into the preheated oven.
Bake for approximately 25-30 minutes or until a toothpick inserted into the center of the cakes comes out clean. Your kitchen will be filled with the delightful aroma of spiced carrots!
Remove the cakes from the oven and let them cool in the pans for about 10 minutes. Then, transfer them to a cooling rack to cool completely.While the cakes are cooling, you can prepare the cream cheese frosting. Beat the cream cheese, softened butter, powdered sugar, and vanilla extract until smooth and creamy. Once the cakes are cool, spread a generous layer of cream cheese frosting on top of one cake layer. Place the second layer on top and frost the top and sides of the entire cake. You can get creative with the decoration - a sprinkle of crushed walnuts or a few carrot-shaped marzipan decorations are always charming choices.
Slice and serve your Old-Fashioned Carrot Cake, and be ready to bask in the compliments!