01 - Preheat oven to 350°F (175°C). Grease and line two 8-inch round cake pans with parchment paper.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, cloves, and ginger.
03 - In a large bowl, beat granulated sugar, brown sugar, and vegetable oil until well combined. Add eggs one at a time, mixing well after each addition. Stir in vanilla extract.
04 - Gradually fold the dry mixture into the wet ingredients until just combined, taking care not to overmix.
05 - Fold in grated carrots, then nuts and raisins if using.
06 - Divide batter evenly between prepared pans and smooth the tops. Bake for 35 to 40 minutes, or until a toothpick inserted into the center comes out clean.
07 - Allow cakes to cool in pans for 10 minutes before transferring to a wire rack to cool completely.
08 - Beat cream cheese and butter until smooth and creamy. Gradually add powdered sugar, vanilla, and salt, beating until fluffy.
09 - Place one cooled cake layer on a serving plate and spread with frosting. Top with the second layer, then frost the top and sides evenly.
10 - Optionally garnish with extra nuts or a dusting of cinnamon. Slice and serve.