Preheat the oven to 350°F and line a baking sheet with parchment paper and set aside. In a large mixing bowl with a paddle attachment beat the butter and sugar until light and fluffy, about two minutes. Add in the eggs and vanilla and beat until combined.
In a separate bowl sift the flour, baking powder, baking soda, cinnamon and salt together. Mix the dry ingredients into the wet mixture until just combined. Scrape down the sides of the bowl and remove the bowl from the mixer.
Fold in the carrots and raisins until fully incorporated. Using a 1.5 ounce cookie scoop, scoop the dough onto the prepared baking sheet, leaving about 2 inches between each cookie. Bake for 12 minutes or until the edges are light golden brown and set, but the centers are still a little gooey.
To make the frosting, place the butter and cream cheese in a stand mixer with a paddle attachment. Whip the butter and cream cheese until light and fluffy, about 4 minutes. Add in the vanilla extract, salt, and powdered sugar and whip to combine, about 2 minutes more.
Transfer the frosting to a piping bag and snip off the end to make a large hole. Pipe frosting over the top of each cookie and sprinkle with chopped nuts if desired. Enjoy!