Ross ROSS = Recommend OSS · open-source software intelligence for agents

staudenmeir/eloquent-json-relations

Laravel Eloquent relationships with JSON keys observed · 2026-08-28

github.com/staudenmeir/eloquent-json-relations · PHP · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

86/100

  • Activity 90
  • Release rhythm 72
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: 9.5
  • age_days: 2891
  • days_rel: 185
  • days_push: 60
  • n_releases_24m: 7

Full methodology

Adoption not part of the score

1079 stars · 64 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A Laravel Eloquent extension that adds support for JSON foreign keys in relationships like BelongsTo, HasOne, HasMany, and morph variants. It also enables many-to-many and has-many-through relationships based on JSON arrays across multiple database engines.

Use cases

  • define eloquent relationships where foreign keys are stored in columns
  • query hasmany relations through a array of ids in laravel
  • build many-to-many relationships using arrays of objects
  • use belongsTo with a foreign key inside a field
  • run -based eloquent relations on mysql, postgres, sqlite, or sql server
  • avoid pivot tables by storing related ids in a column

When to choose

  • you use Laravel Eloquent and store foreign keys or id arrays in JSON columns
  • you want relationship support without dedicated pivot tables or columns
  • you need cross-database JSON relation support (MySQL, MariaDB, PostgreSQL, SQLite, SQL Server)

When to avoid

  • you don't use Laravel or Eloquent ORM
  • your schema uses conventional dedicated foreign key columns
  • you need JSON relations on databases outside the supported versions

Facets

library · maturity active

orm database web-development databases backend php eloquent laravel-package -relationships foreign-keys mysql postgresql sqlite laravel

1 source

Member repositories

RepositoryRoleHealth v2
staudenmeir/eloquent-json-relationsmain86

For agents

markdown · JSON · MCP: product_card(name="staudenmeir/eloquent-json-relations")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem