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 until well blended.
03 - In a large bowl, whisk together granulated sugar, brown sugar, and oil until well combined. Add eggs one at a time, mixing thoroughly after each addition. Stir in vanilla extract.
04 - Gradually add dry ingredients to wet ingredients, mixing until just combined. Do not overmix.
05 - Fold in grated carrots, walnuts, and raisins if using until evenly distributed throughout the batter.
06 - Divide batter evenly between prepared pans. Bake for 35-40 minutes, or until a toothpick inserted into the center comes out clean.
07 - Let cakes cool in pans for 10 minutes, then turn out onto a wire rack to cool completely before frosting.
08 - In a large bowl, beat cream cheese and butter until smooth and creamy. Add powdered sugar, vanilla, and salt. Beat until fluffy and well combined.
09 - Once cakes are completely cool, spread half the frosting over one layer. Place second layer on top and spread remaining frosting evenly over top and sides. Decorate with chopped walnuts around edges or as desired.