reedware/laravel-composite-relations
user_id + role_id as a primary key).Order belongs to a Customer and a Store" (e.g., customer_id + store_id).user_id + permission_id in a pivot table).hasManyThrough with composite keys).BelongsTo, HasOne, HasMany but not belongsToMany).For Executives: "This package lets our Laravel backend handle complex database relationships—like linking orders to both customers and stores—using clean, Eloquent-style code instead of manual SQL. It’s a drop-in solution for legacy systems or multi-key schemas, reducing dev time and technical risk. Low cost (MIT license), minimal maintenance (active updates), and proven by 19+ adopters. Ideal for projects where relational complexity is a bottleneck."
For Engineering:
*"Composite relations in Laravel are a pain point—this package bridges the gap by supporting BelongsTo, HasOne, and HasMany with multi-column foreign keys. Key benefits:
$order->customerStore instead of custom queries).user_id + role_id).belongsToMany or polymorphic cases, but covers 80% of composite relation needs. Worth evaluating if you’re hitting limits with native Eloquent."*How can I help you explore Laravel packages today?