Preheat your oven to 350F, or about 175C.
Use some softened butter to lightly grease the insides of two 9-inch round cake pans.
Cut out some parchment paper into circles to fit snugly in the bottom of the cake pans.
Lay the parchment paper in the bottom of the two greased cake pans.
Gently oil the surface of the parchment with a light layer of softened butter or vegetable oil.
In a large mixing bowl, combine the all-purpose flour, white granulated sugar,
baking soda, baking powder, Kosher salt, ground cinnamon, and ground allspice.
Stir these dry ingredients together until they are thoroughly mixed.
Add in the vegetable oil, and incorporate it well into the dry mixture.
The result should resemble a coarse sandy mixture.
Crack the eggs one at a time into the mixture, stirring well after the addition of each egg.
Fold in the grated carrots, prepared mayonnaise, and chopped nuts.
*The added mayonnaise helps the final cake come out incredibly moist, it doesn’t make the cake taste like mayonnaise.
Mix until these added ingredients are evenly distributed throughout the batter.
Divide the batter evenly into the two 9-inch cake pans that you prepared earlier, and smooth out the top of the batter with a rubber spatula.
Bake in the preheated oven for 40-45 minutes, or until a toothpick inserted into the center of the cake comes out clean.
Remove the cakes from the oven and allow them to cool at rom temperature for roughly 30 minutes.
While the cake is cooling, prepare the cream cheese frosting.
Using a stand mixer with the whisk attachment, whisk together the softened butter and cream cheese in a large bowl until light and airy.
Gradually add in the powdered sugar, whisking continuously.
Finally, whisk in the vanilla extract, lemon zest, and lemon juice, and mix until the frosting is light and fluffy.
Set the frosting aside at room temperature for later.
Once the cakes have cooled for 30 minutes, turn them out of the cake pans onto a wire rack.
Allow the cakes to fully cool for an additional 30 minutes.
When the cakes have cooled completely, place the first cake layer on a serving
plate, and spread a layer of the lemon cream cheese frosting on top.
Add the second cake layer on top of the first frosted cake layer, and frost the top and sides.
Sprinkle the optional chopped pecans and walnuts over the top of the frosted cake for added crunch and aesthetic appeal.
Serve your carrot cake, or you can keep it stored in the refrigerator until it is ready to serve.