01 - Preheat oven to 350°F. Line a 12-cup muffin tin with paper liners.
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, beat together granulated sugar, brown sugar, oil, eggs, and vanilla extract until smooth and well combined.
04 - Gently fold dry ingredients into wet mixture until just combined. Do not overmix.
05 - Stir in grated carrots, and if desired, nuts and raisins until evenly distributed.
06 - Divide batter evenly among cupcake liners, filling each about 3/4 full.
07 - Bake for 20–22 minutes, or until a toothpick inserted in the center comes out clean.
08 - Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
09 - Beat cream cheese and butter together until creamy. Add powdered sugar, vanilla, and salt. Beat until smooth and fluffy.
10 - Once cupcakes are completely cool, frost generously with cream cheese frosting.