Philadelphia Eagles quarterback Nick Foles barely missed out on a $1 million bonus in the regular season, needing just four more snaps to earn the extra seven figures, but the team wanted to give back for all he did.

Per ESPN.com's Field Yates, the Eagles wound up up paying him the $1 million bonus anyway, after barely missing out on the extra pay:

Foles was about to reach the required snaps total in Week 17 against the Washington Redskins, but he had to leave because of a chest injury. Thus, he didn't quite reach the 33 percent of snaps (as noted by Yates above), needed to earn the $1 million.

But Philadelphia was feeling more than generous here, and for good reason. When Carson Wentz was shut down after Week 14, Foles came in and led the Eagles to three straight wins to nab the final Wild Card spot in the NFC. On top of that, Foles and the Eagles upset the 12-4 Chicago Bears in the first round of the postseason.

The Eagles pushed the top-seeded New Orleans Saints last week, but they narrowly lost 20-14, following a handful of mistakes in the second half. It was more than likely Foles' last game with Philadelphia, as head coach Doug Pederson already said that Wentz would be their starter in 2019.

RELATED: EAGLES’ ALSHON JEFFERY MEETS WITH YOUNG FAN WHO WROTE ADORABLY ENCOURAGING LETTER

Credit: Eric Hartline-USA TODAY Sports

Foles led the Eagles to a Super Bowl LII championship last season, after Wentz tore his ACL in Week 14 against the Los Angeles Rams. Foles was also named Super Bowl MVP for his heroics, and he kept the magic going a little longer - thus earning every penny of that $1 million bonus.

The 29-year-old Foles carries a $20 million option for 2019, which the Eagles surely won't be looking to pick up. He's set to either be traded or let go in order to test the free agent market. But Philly gave him a little extra gift to thank Foles for his heroics once again.

What This Means

It was a classy gesture from the Eagles, who will forever be thankful for everything Foles has done during his time here. Wentz is going to be the quarterback long term here, but Foles saved his career with some incredible and clutch performances in 2017 and 2018.

NEXT: EAGLES PLANNING TO TEST MARKET ON NICK FOLES TRADE