House Majority Leader Kevin McCarthy, R-Calif., said Thursday that he took a helping of advice from President Trump on how to collect votes for the bill to partially repeal and replace Obamacare.

Speaking at the White House after the bill passed, McCarthy said Trump called him up yesterday, and gave him a list of Republicans to talk to in an effort to collect votes.

"Walk into my office yesterday morning, they say the president's calling again," he said. "I know my members well. The president gives me a list of who he thinks I would be best to talk to on the list. And he was right."

"And Mr. President, they all voted for the bill," McCarthy added, drawing laughs from the crowd of Republican lawmakers.

McCarthy, House Speaker Paul Ryan, R-Wis., and dozens of other Republicans went to the White House immediately after the 217-213 vote.

Both thanked Trump and Vice President Pence, and Ryan said their personal involvement is what made House passage possible.

"I want to thank Mike Pence and I want to thank President Donald Trump for their personal involvement in working with our members and working to get this right for getting this done and getting us to where we are," Ryan said.