Preheat the Oven and Prepare Pans: Set your oven to 175°C (350°F). While it heats, grease two 9-inch round cake pans with butter or non-stick spray. To ensure an easy release, line the bottoms with parchment paper, if possible.
Prepare Dry Ingredients: In a large mixing bowl, sift together the flour, baking powder, baking soda, cinnamon, and salt. This ensures that the leavening agents and spices are evenly distributed, which is crucial for a consistent texture and flavor.
Mix Wet Ingredients: In another bowl, whisk together the sugar, eggs, and oil until smooth and well-combined. Whisking properly helps create a lighter texture in the final cake and blends the ingredients thoroughly.
Combine Dry and Wet Mixtures: Gradually add the dry ingredients to the wet mixture, stirring gently until just combined. Overmixing can lead to a denser cake, so mix just until you no longer see streaks of flour.
Fold in Carrots and Optional Ingredients: Carefully fold in the grated carrots, chopped walnuts, and raisins (if using). Gently incorporating these ingredients ensures an even distribution without deflating the batter.
Divide Batter and Pour into Pans: Pour the batter evenly into the prepared cake pans, spreading it to ensure an even surface. Using equal portions will help both layers bake consistently.
Bake the Cakes: Place the pans in the preheated oven and bake for 25-30 minutes. To check if they’re done, insert a toothpick into the center; if it comes out clean or with a few crumbs, the cakes are ready.
Cool the Cakes: Allow the cakes to cool in their pans for 10 minutes. Then, carefully run a knife around the edges, remove from the pans, and transfer to a wire rack to cool completely before frosting. This step ensures the cakes stay moist and firm up as they cool.