01 - Preheat oven to 350°F. Grease and line two 8-inch round cake pans with parchment paper.
02 - Whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, cloves, and ginger in a medium bowl.
03 - Beat granulated sugar, brown sugar, and vegetable oil in a large bowl until well combined.
04 - Incorporate eggs one at a time into the sugar mixture, mixing thoroughly after each addition. Stir in vanilla extract.
05 - Fold dry ingredient mixture into wet mixture gradually until just combined without overmixing.
06 - Gently fold in grated carrots, nuts, and raisins if using.
07 - Divide batter evenly between prepared pans and smooth tops.
08 - Bake 35 to 40 minutes or until a toothpick inserted at center comes out clean.
09 - Allow cakes to cool in pans for 10 minutes, then invert onto wire racks to cool completely.
10 - Beat cream cheese and softened butter until smooth. Gradually add powdered sugar, vanilla, and salt; beat until fluffy.
11 - Spread frosting over one cooled cake layer; stack second layer on top. Frost top and sides evenly.
12 - Optional: garnish with extra nuts or a light dusting of cinnamon. Slice and serve.