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

Eloquent Json Relations Laravel Package

staudenmeir/eloquent-json-relations

Adds JSON foreign key support to Laravel Eloquent relationships (belongsTo, hasMany, morph*, through). Also enables many-to-many and has-many-through relations using JSON arrays (IDs or objects) across MySQL, Postgres, SQLite, SQL Server.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Excellent alignment with Laravel's Eloquent ORM, extending core relationship patterns without reinventing APIs. Uses Laravel's native JSON query capabilities, ensuring consistency with existing model behaviors. Integrates seamlessly into typical Laravel stack patterns where JSON columns are used for flexible schema design.

Integration feasibility: High feasibility via Composer dependency; requires Laravel 8+ (per common package patterns) and a JSON-capable database (MySQL 5.7+, PostgreSQL, or SQLite 3.9+). Minimal code changes needed for relationship definitions, but requires validation of current JSON column structures (e.g., array of IDs vs. nested objects). Database-specific JSON function support must be confirmed.

Technical risk: Moderate performance concerns with large JSON datasets (e.g., 10k+ IDs in a single column), as JSON queries may not scale as efficiently as traditional joins. Risk of breaking changes if Laravel updates JSON query internals. Package maintenance status is unclear despite 1075 stars (last release dated 2026-03-01, which appears erroneous—requires verification of actual release timeline).

Key questions:

  • What is the exact Laravel version compatibility?
  • How does query performance degrade with JSON arrays exceeding 1k elements?
  • Are there known edge cases with nested JSON paths or polymorphic relationships?
  • Is the package actively maintained (current GitHub activity and issue resolution rate)?

Integration Approach

Stack fit: Ideal for Laravel projects using JSON columns for relationships (e.g., tagging systems, multi-tenant data, or schema-less features). Fully compatible with Laravel's existing Eloquent

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