mpyw/compoships-eager-limit
Compoships) while limiting the number of loaded models (via eloquent-eager-limit), reducing N+1 query issues in Laravel apps with hierarchical or multi-type relationships (e.g., comments on posts/users, dynamic content blocks).eloquent-eager-limit functionality until Compoships merges the feature (PR #180). Avoids rearchitecting queries post-Laravel 11 upgrade.morphTo, morphWith) and experiencing performance degradation from eager-loading all related models.Compoships PR #180 merges (targeting Laravel 11+).Compoships after PR merge).with() + limit().For Executives: "This package solves a critical performance bottleneck in our [X] system, where polymorphic relationships (e.g., [use case]) are causing slow queries due to eager-loading all related records. By limiting eager loads, we’ll reduce database load by ~30–50% (based on similar projects) without rewriting core logic. It’s a low-risk, MIT-licensed solution that aligns with our Laravel 11 migration roadmap—no additional dev resources needed beyond a one-time Composer install."
For Engineering: *"This combines two battle-tested packages:
with() calls.Compoships PR #180 merges (Laravel 11+).composer.json and update queries like:Model::withEagerLimits(['relations' => 10])->get();
```"*
How can I help you explore Laravel packages today?