laragear/json
Laragear/Json makes JSON columns in Laravel easy to work with: cast attributes to typed objects, validate nested data, query values cleanly, and keep Eloquent models tidy. A lightweight toolkit for structured, schema-friendly JSON storage.
data_get/data_set scattered across the codebase, ad-hoc casts, and one-off normalizers. Buying a ~single-purpose package is cheaper than owning an internal helper that every team reimplements, provided the API surface stays stable.v3.0.0...v4.0.0 before it lands in any roadmap commitment. Until that diff is reviewed, do not assume new capabilities or absence of breaking changes — the release notes published for v4.0.0 are only a compare link.Adopt when:
json columns or casting to array/collection.Look elsewhere when:
jsonb operators, MySQL JSON functions, or a document store — not a PHP wrapper.composer.json constraints for v4.0.0 explicitly, since major bumps commonly raise the minimum PHP/Laravel floor.data_get/data_set plus Eloquent casts already cover the need. The package's value is ergonomics and consistency at scale; a single call site does not justify a dependency.Gate before any adoption: obtain the actual v3→v4 diff, confirm breaking changes against your call sites, check for deprecations and removals, and pin the version in composer.json rather than floating to ^4.
To executives: This is a small, low-cost dependency that standardizes how we handle the JSON-shaped data already in our product — settings, preferences, integration payloads. The business case is reduced custom code and faster iteration on features that touch those payloads, not new user-facing capability. The v4.0.0 release is a major version, which means the upgrade carries a bounded engineering cost; we should fund a short review before adopting, and we should not attach a delivery date to any feature that depends on it until that review is done.
To engineering: The package gives a fluent, Laravel-idiomatic object for JSON documents — dot-notation access, safe nested writes, merge semantics — replacing hand-rolled data_get/data_set chains and per-feature casts. It is a convenience layer, not a validation or query layer: it does not enforce schema and does not help you filter inside a JSON column. The immediate action item is the v4.0.0 breaking-change review — diff against v3.0.0, confirm the PHP/Laravel support matrix, identify removed or renamed methods, and inventory our call sites. Recommend pinning the version and covering the integration with a thin internal adapter so a future major bump is a single-file change rather than a codebase-wide sweep.
Recommendation: Proceed to evaluation spike; defer adoption decision and any roadmap commitment until the v4.0.0 diff has been reviewed and our call-site inventory is complete.
How can I help you explore Laravel packages today?