The bill, which includes spending cuts, funding for border security and other staples of the Trump agenda, now moves to the Senate.