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.
hasManyJson or belongsToJson and query like native Eloquent. Eliminates error-prone raw SQL and manual joins, keeping our codebase clean, testable, and consistent."How can I help you explore Laravel packages today?