Nick Foles threw two touchdown passes, NFL rushing champion LeSean McCoy had 120 yards and a receiving score and the Philadelphia Eagles beat the Dallas Cowboys 24-22 in a win-or-go-home game for the NFC East title Sunday night.