# topclaudy/compoships

Multi-columns relationships for Laravel's Eloquent ORM

Repository: https://github.com/topclaudy/compoships
Canonical: https://ross.abutalabs.com/products/compoships
Language: PHP
License: MIT
License Family: permissive
Topics: laravel, composite-keys, relationships, eloquent, multi-columns, multi-keys
Last push: 2026-08-19T15:47:55+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 86, longevity 100
- inputs: {"age_days": 3073, "days_push": 14, "days_rel": 14, "gap_med": 35, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1207, forks 143 (observed 2026-08-28T04:03:59.541834+00:00)

## What it is
Compoships is a PHP library that extends Laravel's Eloquent ORM to support relationships based on two or more columns (composite keys). It works via a base model class or trait, enabling eager loading of relationships that match multiple columns.

## Use cases
- define eloquent relationships on composite keys
- eager load relationships matching multiple columns
- work with legacy database schemas in laravel
- hasMany relationship with multiple foreign keys
- belongsTo relationship with two foreign keys

## When to choose
- you use Laravel Eloquent and need relationships matching multiple columns
- you work with third-party or pre-existing schemas with composite keys
- where clauses fail during eager loading because of null attributes

## When to avoid
- your schema uses single-column keys, which Eloquent handles natively
- you don't use Laravel or Eloquent
- you need full composite primary key support for CRUD operations rather than just relationships

## Facets
- artifact type: library
- maturity: active
- function: orm, database
- domain: web-development, databases, backend
- platform: php
- tags: eloquent, composite-keys, laravel-package, relationships, laravel

## Member repositories
- topclaudy/compoships (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.541834+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:15.062761+00:00, confidence not recorded.
  - readme: https://github.com/topclaudy/compoships (fetched 2026-08-28T04:03:59.541834+00:00, sha 7c73ce9ebd98)
- Data as of 2026-08-30T08:39:29.467469+00:00.
