Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Compoships Laravel Package

awobaz/compoships

Compoships enables Laravel Eloquent relationships on composite keys—match two or more columns for hasOne/hasMany/belongsTo, including eager loading. Ideal for legacy or third‑party schemas where single-column foreign keys aren’t possible.

View on GitHub
Deep Wiki
Context7

Compoships adds support for multi-column (composite) relationships in Laravel’s Eloquent ORM, enabling hasOne/hasMany/belongsTo relations that match on two or more columns—ideal for legacy or third‑party schemas where single-key relations aren’t enough.

Instead of fragile where constraints that break with eager loading, Compoships lets Eloquent resolve relationships using composite keys consistently.

  • Define relationships using multiple foreign/local columns
  • Works correctly with eager loading (with())
  • Use via an extended Model base class or a reusable trait
  • Keeps Eloquent’s core behavior intact while enhancing relations
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport