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

Eager loading, but only if you really need to

A one-word change to eliminate duplicate queries

Joel Clermont
Joel Clermont
2026-03-06

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

You're already using eager loading to reduce queries, but did you know that calling load() on a model can fire the same query twice if the relationship was already loaded?

In this video, I walk through a real scenario with nested Livewire components and show you how loadMissing() solves the problem.

Watch Now (3 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. Duplicate queries are the kind of thing that's easy to miss in your own code. A second set of eyes can catch performance issues like this before they hit production. Schedule a 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.