The figurative meaning of this phrase goes back to at least the 1930s. The term is used by an American poet named Ogden Nash, who wrote Primrose Path in 1936. There's a quote from it that reads:
Her picture's in the papers now, And life's a piece of cake