kitloong/eloquent-power-joins-with-compoships
team_id + category_id). Critical for complex relational models (e.g., multi-tenancy, hierarchical data, or multi-dimensional relationships).tenant_id + user_id).category_id + subcategory_id).model_id + action_type).Adopt if:
ON table1.col1 = table2.col1 AND table1.col2 = table2.col2).hasMany with multi-column FKs).Look elsewhere if:
For Executives: "This package lets our Laravel backend handle complex data relationships—like multi-key foreign keys (e.g., team + category)—without writing raw SQL. It’s a drop-in solution for teams using Compoships, cutting development time for features like multi-tenancy or hierarchical data. The MIT license and active maintenance (last release: 2025) make it a low-risk investment to accelerate our roadmap."
For Engineering: "If we’re already using Compoships for composite keys, this extends Eloquent Power Joins to support them seamlessly. Replace verbose SQL like:
SELECT * FROM users INNER JOIN posts ON users.team_id = posts.team_id AND users.category_id = posts.category_id
with:
User::joinRelationship('posts');
Gains: cleaner code, consistent query patterns, and support for hasOne, hasMany, and belongsTo with composite keys. Tradeoff: minor query complexity overhead (negligible for most use cases)."
How can I help you explore Laravel packages today?