kirschbaum-development/eloquent-power-joins
Eloquent Power Joins brings Laravel-style joins to Eloquent. Join via relationship definitions, reuse model scopes in join contexts, query relationship existence with joins, and sort by related columns/aggregations—all with cleaner, more readable queries.
users, orders, and payments with filters (e.g., orders.paid_at > NOW()).Image linked to Post/User).whereNull('deleted_at').posts sorted by comments.count DESC).Adopt if:
users.posts.comments) or polymorphic relationships.Look elsewhere if:
where clauses).For Executives:
"This package modernizes Laravel’s query builder by making joins as intuitive as Eloquent relationships. It cuts development time for complex reports by 30%+ while reducing SQL errors. For example, joining users.posts.comments becomes User::joinRelationship('posts.comments')—no manual table aliases or ON clauses. It’s a force multiplier for data teams, enabling faster iteration on analytics and user-facing dashboards."
For Engineering: *"Eloquent Power Joins bridges the gap between Eloquent’s ORM elegance and raw SQL power. Key wins:
User::joinRelationship('posts.comments') handles the SQL for you.Post::published() directly in join callbacks.deleted_at unless explicitly overridden.whereExists with joins for better scalability in large datasets.
Tradeoff: Minimal runtime overhead (~5–10ms per query) for massive readability gains. Recommended for any project with multi-table queries."*How can I help you explore Laravel packages today?