Preheat the oven to 350°F (175°C). Grease and flour your cake pans or line them with parchment paper.
Mix dry ingredients: In a large bowl, whisk together flour, sugar, baking soda, baking powder, cinnamon, nutmeg, cloves (if using), and salt.
Mix wet ingredients: In a separate bowl, beat the eggs, oil, and vanilla extract until smooth and well-combined.
Combine wet and dry ingredients: Gradually fold the wet mixture into the dry mixture until just combined. Be careful not to overmix.
Add carrots and mix-ins: Gently fold in the grated carrots, walnuts, and raisins (if using).
Pour into pans: Divide the batter evenly between the prepared pans (or muffin tin for cupcakes) and smooth the top.
Bake: Bake for 30–35 minutes for round cakes or 18–20 minutes for cupcakes, or until a toothpick inserted into the center comes out clean.
Cool: Allow the cake to cool in the pans for 10 minutes, then transfer to a wire rack to cool completely.
Make the frosting: Beat together cream cheese and butter until smooth. Gradually add powdered sugar, one cup at a time, beating until light and fluffy. Stir in vanilla and salt.
Frost the cake: Once the cake is completely cool, spread the cream cheese frosting evenly on top of the cake layers or cupcakes. Decorate as desired with extra walnuts, coconut, or other toppings.