01 - Preheat oven to 350°F. Grease and line two 9-inch round cake pans with parchment paper.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
03 - In a large bowl, whisk together granulated sugar, brown sugar, and oil until well combined. Add eggs, one at a time, mixing well after each addition. Stir in vanilla extract.
04 - Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
05 - Fold in grated carrots, walnuts, and raisins (if using) until evenly distributed.
06 - Divide the batter evenly between the prepared pans.
07 - Bake for 35 to 40 minutes, or until a toothpick inserted into the center comes out clean.
08 - Let cakes cool in pans for 10 minutes, then turn out onto a wire rack to cool completely.
09 - In a large bowl, beat cream cheese and butter until smooth and creamy. Add powdered sugar, vanilla, and salt; beat until fluffy.
10 - Once cakes are completely cool, spread half the frosting over one layer. Place the second layer on top and spread the remaining frosting evenly over the top and sides.
11 - Decorate with chopped walnuts around the edges or as desired.