U.S. House Majority Whip Steve Scalise says he thinks teachers should be able to carry guns on school grounds if they are properly trained, echoing a view held by President Donald Trump.

"As long as they are properly trained, that should be their prerogative," Scalise said Friday while visiting the campus of Kenner Discovery Charter School. "If they don't want to, they shouldn't have to, but if they want to, they ought to have that right."

School safety and mass shootings have become a major focal point in the media and for Trump since last week's shooting at Marjory Stoneman Douglas High School in Parkland. Seventeen people were killed in the shooting, and teen survivors of the attack have recently made headlines calling for stricter gun laws.

Scalise, himself, is still recovering from near fatal injuries sustained during a mass shooting that took place last year as he and other Republicans practiced for a charity baseball game.

His comments Friday came just hours before Trump's address to the Conservative Political Action Conference on Friday, during which the president again argued that teachers should be allowed to carry guns to work and called for the elimination of "gun-free" zones on school grounds.

"(School shooters) are inherently cowards," Trump said. "If they thought – like, if this guy thought that other people would be shooting bullets back at him, he wouldn't have gone to that school. He wouldn't have gone there. It's a gun-free zone. It says, this is a gun-free zone; please check your guns way far away. And what happens is they feel safe. There's nobody going to come at them."

Scalise, who is the longest-serving and highest ranking member of Louisiana's congressional delegation, has been a close ally of Trump since before the president took office. He flew with Trump to Louisiana during the presidential campaign in August 2016 and again for a GOP rally in Baton Rouge in December 2016.

Trump frequently refers to Scalise as his "friend," and during the president's State of the Union address last month, he praised Scalise as the "legend from Louisiana," drawing uproarious applause.

On Friday, Trump also reiterated his support for stronger background checks on gun purchasers and addressing mental illness.

"I really believe that Congress is going to get it through this time," he said. "They have somebody that wants to get it through; not somebody that's just all talk, no action, like so many of these folks. This is somebody that wants to get it through."

During his school visit, Scalise took several questions from a Discovery civics class of 9th and 10th graders, though none asked about the shooting he survived, the Florida school shooting or gun issues in general.

"We see so many of these mass shootings happening in gun-free zones – schools, churches – if the shooter knows they are the only person there who has a gun, that puts them at a serious advantage," Scalise said after the formal program, surrounded by students eager to take photos with the No. 3 ranking member in the U.S. House.

The shooting at Marjory Stoneman Douglas High in Parkland, Florida, has rallied those who want tighter restrictions on guns. A group of students who survived the shooting have organized a national campaign against school violence.

Scalise said that he thinks the calls for new laws regulating guns are premature.

"While some people are saying let's change a bunch of laws, this kid broke a bunch of laws, first of all, in doing what he did but there were telltale signs and there were mechanisms in place that broke down. We have to find out why they broke down and hold those people accountable," he said. "You can pass all the laws you want, but if they aren't being implemented – which is what happened here – then those laws are worthless."

Scalise said he was particularly dismayed to learn that a sheriff's deputy assigned to the Florida school remained outside as the shooting unfolded. "It angers me so much that there was someone there who ultimately could have stopped it," he said.

As majority whip, Scalise is assigned a Capitol security detail. The two officers assigned to him the morning of the June 14 shooting that he survived have been credited with saving others on the field and ending the attack. One of those officers, David Bailey, was with Scalise in Kenner on Friday.

"They were both shot and continued to take down the shooter and ultimately they took him away from shooting at us," Scalise said of Bailey and special agent Crystal Griner, both injured in the attack.

Doctors said Scalise was in "imminent risk of death" after the shooting when he arrived by airlift to a Washington hospital with significant damage to bones and internal organs and blood loss. The single gunshot to the hip he took required multiple surgeries, the most recent of which was last month. At the school Friday, he still relied on his purple crutches to move around, though he was able to stand at a podium without them while he talked to students.

Scalise also said he's frustrated by critics who have taken politicians to task when they offer "thoughts and prayers" to victims of attacks.

"My first thought is always to pray for the victims. Unfortunately, I think some people almost criticize those of us who believe in prayer," Scalise said.

Follow Elizabeth Crisp on Twitter, @elizabethcrisp.