Skip to content

Glossary: Laravel

Eager loading

Also written: with(), load(), eager-load

Loading related rows up front, as in Order::with('items.product')->get(), so a loop doesn't run one query per row. It fixes the N+1 problem.

Where the book teaches it

Related terms

N+1 problemRelationship