Add schemaless attributes to Eloquent models
1.1k
Stars
53
Forks
0
Open issues
24
Contributors
AI Analysis
This Laravel package adds NoSQL-like schemaless attributes to Eloquent models by storing arbitrary JSON data in a single database column. It is purpose-built for Laravel developers who need flexible, unstructured data storage without database migrations for each new attribute, making it ideal for applications with highly dynamic data schemas.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Spatie's Schemaless JSON Storage for Laravel—Stable, Mature, Limited Growth
laravel-schemaless-attributes provides a trait for Laravel Eloquent models to store arbitrary JSON data in a single database column, bridging relational and document-oriented patterns. Built by Spatie, a prolific PHP open source publisher, it serves Laravel developers who need flexible schema evolution without migrations for certain attributes. Downloads and integration are steady but not accelerating; the package occupies a permanent niche for projects valuing schema flexibility within a relational model.
Created May 2018 by Spatie, the package emerged as JSON column support matured in MySQL 5.7+. It addressed a practical tension: Laravel applications needed some schemaless flexibility without abandoning Eloquent. Spatie's reputation and consistent package maintenance ensured early adoption within the Laravel ecosystem.
The package gained traction through 2019–2022 as Laravel versions 6–8 stabilized and JSON columns became standard. Growth plateaued by 2023–2024; the 1,084 stars and 1 star gained in the past 7 days reflect mature-market saturation. Adoption appears to have settled into a stable, predictable user base rather than expanding into new use cases. No evidence of viral adoption or major ecosystem shifts driving new interest.
Packagist download metrics mentioned in README but specific numbers not provided in excerpt. 1,084 GitHub stars and 53 forks suggest meaningful but not dominant adoption. Spatie's track record (sibling packages like laravel-translatable at 2,455 stars and laravel-tags at 1,746 stars) implies this package likely has production users, but adoption not explicitly verified through case studies, blog posts, or referenced organizations in README.
Based on README, the package provides a custom Eloquent cast (`SchemalessAttributes`) that wraps JSON column data and exposes it via dot-notation accessors and array-like syntax. It likely uses PHP property magic methods (`__get`, `__set`) for fluent attribute access. A trait-based approach allows multiple schemaless columns per model. Architecture appears straightforward: a thin wrapper over Laravel's native JSON support rather than a complex abstraction.
README mentions GitHub Actions workflow badge for tests, indicating automated testing is in place. Specific coverage metrics not documented in README excerpt. Evidence of CI/CD suggests quality gates exist, but depth is not disclosed.
Last push June 2, 2026 (5 weeks before evaluation date) indicates active maintenance. Repository has not entered maintenance-only mode. However, infrequency of recent star gains and low fork count (53) suggest the package is not experiencing urgent feature requests or competitive pressure. Maintenance appears healthy but not growth-focused.
ADOPT IF: you are building a Laravel application using MySQL 5.7+ that requires flexible, unstructured attribute storage on specific model fields without adding database migrations for each new field, and you value Spatie's maintenance track record and simple API. AVOID IF: your entire application domain is schemaless (use a document database instead), or you prioritize cutting-edge feature velocity and community innovation (this is mature and stable, not growing). MONITOR IF: you are considering laravel-data or other newer Spatie packages that may overlap in functionality—evaluate whether the broader abstraction provides better fit for your data modeling strategy.
Independent dimensions
Mainstream potential
3/10
Technical importance
5/10
Adoption evidence
5/10
- Dependency on MySQL/PostgreSQL JSON support—not portable to older database versions. No built-in support for databases lacking native JSON types.
- Potential performance degradation if querying deeply nested schemaless attributes at scale; dot-notation queries on JSON may not use indexes as efficiently as structured columns.
- API surface is minimal and unlikely to expand significantly. Future Laravel versions may make this package redundant (e.g., if Laravel adds native schemaless attribute casting helpers).
- Limited documentation of real-world use case specifics—README shows examples but does not discuss when schemaless attributes should or should not be used versus schema normalization.
- Ownership concentration: Spatie maintains many Laravel packages; if Spatie's Laravel investment shifts, maintenance could slow or transfer to community with less institutional support.
laravel-schemaless-attributes will likely remain in steady maintenance mode through 2027–2028, serving its established user base without significant growth or major feature additions. It will not become a dominant Laravel ecosystem tool, but will remain a reliable, known option for a specific use case. Gradual drift toward Laravel's native JSON support improvements may reduce perceived need over time.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Website
- https://spatie.be/en/opensource
- Language
- PHP
- License
- MIT
- Last updated
- 1mo ago
- Created
- 100mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
No open issues — clean slate.
Open pull requests
No open pull requests.
Top contributors
Recent releases
Similar repos
spatie/laravel-translatable
A Laravel trait that makes Eloquent models translatable by storing translations...
staudenmeir/eloquent-json-relations
This Laravel Eloquent extension enables relationships to be defined using JSON...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.1k | +1 | PHP | 8/10 | 1mo ago |
|
|
2.5k | — | PHP | 8/10 | 2w ago |
|
|
1.1k | — | PHP | 8/10 | 6d ago |
|
|
1.8k | — | PHP | 8/10 | 2w ago |
|
|
1.7k | — | PHP | 8/10 | 2w ago |
|
|
1.6k | — | PHP | 8/10 | 2w ago |
Built into Laravel since 5.1+. Offers basic get/set without the dot-notation querying and model scope helpers this package provides. Laravel-schemaless-attributes adds developer ergonomics; competing directly with framework features limits market size.
Overlaps in scope—both address JSON column work in Eloquent. eloquent-json-relations focuses on relationship queries across JSON fields; laravel-schemaless-attributes focuses on flexible attribute storage. Slightly different use cases, similar star count suggests market split.
Broader data-object abstraction layer. Can complement or substitute for schemaless attributes in some workflows. Spatie's own newer package may canibalize adoption of laravel-schemaless-attributes for some teams.
Solve the underlying problem (schemaless storage) at the database level. Organizations choosing fully document-oriented databases bypass this package entirely. Laravel-schemaless-attributes is for teams committed to relational databases but needing tactical flexibility.
Similar adoption profile and Spatie authorship. Both are stable, specialized tools serving narrow, well-defined needs within Laravel. Neither competes for dominance; both succeed by addressing specific workflows efficiently.
