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 combined.
03 - In a large bowl, beat together granulated sugar, brown sugar, oil, eggs, and vanilla extract until smooth and well blended.
04 - Gently fold the dry ingredients into the wet mixture until just combined. Be careful not to overmix.
05 - Stir in grated carrots, nuts, and raisins if using, until evenly distributed throughout the batter.
06 - Divide batter evenly among cupcake liners, filling each about 3/4 full.
07 - Bake for 20 to 22 minutes, or until a toothpick inserted into the center comes out clean. Cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
08 - Beat cream cheese and butter together until creamy and smooth. Add powdered sugar, vanilla, and salt. Continue beating until fluffy and well combined.
09 - Once cupcakes are completely cool, frost generously with the cream cheese frosting using a knife or piping bag.