David Beckham capped his playing career with Los Angeles Galaxy by winning the MLS Cup in his final game.