A new Texas law allowing schools to have “share tables” for distributing extra food is being called a win-win by students, parents and administrators.

Signed into law in late 2017, The Texas Student Fairness in Feeding Act’s impact has been immediate and twofold: helping feed hungry students and keeping perfectly edible food out of the landfill along the way.

"It affects their learning. If they're hungry, how can they concentrate?" Charisse Cline, who works at Cody Elementary School in San Antonio, told KSAT. "I’m a teacher, and you have concerns and you care about that and you want to make sure their needs are met."

Before the new law passed, schools weren’t legally allowed to let students share their leftover food with their classmates. As a result, a lot of perfectly good food was thrown away each day.

"We did see quite a bit of waste. The kids would comment on it. 'Well, are we just gonna throw it away?' And also the teachers would make those comments," Kittiya Johnson, principal at Cody Elementary, told KSAT.

WATCH: Nobody Eats Lunch Alone at this Florida High School

Now San Antonio’s Northside Independent School District has a "share cart," which allows students to put in milk, juice or packaged foods they didn't use. It’s available for all students, but they have to eat it during school mealtimes.

"As soon as those items are in the cart, they're taken almost immediately," Johnson told KSAT.

It’s only been a few months, but students at participating schools are already reaping the benefits. "The kids are definitely happier," Cline said.