Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Considerations when eager loading resource collections

The dreaded N+1 strikes again

Joel Clermont
Joel Clermont
2025-08-22

From our daily Laravel tips email. Get the next one in your inbox.

Performance issues can creep up on you if you're not careful. If we aren't completely diligent at all times, we can end up with a lazy loading query that can seriously impact performance in production.

In today's video, I'll walk through an example with API resources and collections, and how to solve it in a consistent way across your application.

Watch Now (5 min)

And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.

Here to help,

Joel

P.S. Want some help reviewing your Laravel code for performance issues? Get an expert Laravel code review.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.