It’s been a hectic year for President Donald Trump in the courts, as he has repeatedly found himself and his administration facing federal judges across the country.

While some of the opinions have been in his favor, like the U.S. Supreme Court allowing his long-promised wall on the southern border to be built, other rulings have ended in key defeats.