01 - Preheat oven to 350°F. Grease and line two 9-inch round cake pans or one 9x13-inch pan with parchment paper.
02 - In a large bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and cloves.
03 - In a separate bowl, blend granulated sugar, brown sugar, and vegetable oil until smooth. Add eggs one at a time, beating well after each. Stir in vanilla extract.
04 - Gradually fold the dry mixture into the wet ingredients until just combined.
05 - Gently fold in grated carrots, nuts, and raisins if using.
06 - Divide batter evenly into prepared pans and smooth the tops.
07 - Bake for 40 to 45 minutes or until a toothpick inserted in the center comes out clean. Let cool in pans for 10 minutes, then transfer to a wire rack to cool completely.
08 - Beat together softened cream cheese and butter until creamy. Add powdered sugar, vanilla, and salt; beat until fluffy and smooth.
09 - Once cooled, spread frosting over one cake layer, top with second layer, then frost top and sides. For sheet cake, frost top generously.
10 - Optionally, garnish with extra nuts or a sprinkle of cinnamon. Slice and serve.