DEV Community

Discussion on: 3 simple tips to improve your Laravel code today

Collapse
 
chrisrhymes profile image
C.S. Rhymes

I understand this is for demonstrating the power of collections, but wouldn’t it be better to use a where statement in the original query to only get students that are participants rather than filtering them out in a collection method later?

Collapse
 
omarajmi profile image
Omar Ajmi

You get me nice thumbs up