The N+1 query problem — where accessing relationships in a loop triggers a separate query per record — is the most common Eloquent performance issue. Eager loading with with() is the primary fix, alongside other optimizations (selecting columns, chunking, indexing).
The N+1 problem and its fix
= ::();
( ) {
->author->name;
}
= ::()->();
( ) {
->author->name;
}
