Preheat oven to 350 degrees F. Grease and flour three 8-inch round cake pans. If you want you can put rounds of parchment on the bottom of each pan and grease the parchment.
In a large bowl, whisk together the flour, baking powder, baking soda, salt and cinnamon, making sure all ingredients are very evenly distributed. This is very important because unevenly distributed baking soda has been known to cause carrots to turn green.
In the bowl of a stand mixer using the whisk attachment, beat the eggs on medium, increasing slightly to medium high. When eggs are frothy, gradually add the sugar and continue beating until light and lemon color. With the mixer going, gradually add the oil letting it trickle down the side.
Remove the bowl from the stand and with a heavy duty scraper (or your favorite mixing spoon) stir in the flour mixture until it is evenly blended. Once flour is incorporated, stir in the carrots, raisins (if using) and nuts.
Divide the batter among the pans. Each pan should get a little over a pound of batter.
Bake the cakes for about 30 minutes, allow them to cool for 10 minutes in pan, then carefully loosen and turn from pans to cool completely.
Prepare the frosting. In the bowl of a stand mixer beat the room temperature butter and cream cheese until fluffy. Add the confectioners’ sugar and beat until creamy, then beat in the vanilla. If desired, add 1 ½ cups of pineapple.
When cake has cooled completely, cut each layer horizontally so that you have six layers. Frost and fill with the cream cheese frosting, then chill cake for about an hour before serving.