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

Laravel Schemaless Attributes Laravel Package

spatie/laravel-schemaless-attributes

Add “schemaless” JSON attributes to Laravel Eloquent models. Store arbitrary key/value data in one JSON column with a fluent API: get/set via properties or arrays, dot-notation access, defaults, forget keys, and query scopes for matching attributes.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables rapid iteration on product features requiring dynamic data structures (e.g., user preferences, configurable settings, or A/B test configurations) without database schema changes
  • Eliminates the need for custom-built schemaless storage solutions, reducing technical debt and development time for evolving requirements
  • Supports complex nested data scenarios (e.g., user-specific form layouts or dynamic metadata) where rigid database columns would create bottlenecks
  • Ideal for use cases where data structure varies per record instance (e.g., e-commerce product variations, CMS content blocks, or analytics event tracking)

When to Consider This Package

  • ✅ Adopt when:
    • Data attributes are unpredictable or frequently changing (e.g., user-generated content metadata)
    • You need to avoid frequent database migrations for schema updates
    • Your database supports JSON columns (MySQL 5.7+, PostgreSQL, etc.)
    • You require simple dot-notation access or query scopes for nested JSON data
  • ❌ Avoid when:
    • Data requires strict relational integrity (foreign keys, joins, or transactional consistency)
    • Attributes are fixed and predictable across all records (e.g., standard user profiles)
    • You need advanced validation beyond JSON schema (e.g., type enforcement for specific fields)
    • Operating on legacy databases without JSON support or strict security requirements for unstructured data

How to Pitch It (Stakeholders)

Executives: "This package lets us ship dynamic features—like customizable user dashboards or flexible product configurations—in days instead of weeks. By eliminating database migrations for new data fields, we reduce engineering costs by 40% while accelerating time-to-market for customer-driven innovations. Spatie’s battle-tested solution ensures reliability without compromising our ability to adapt to market changes."

Engineering: "It integrates seamlessly with Eloquent via a single trait and cast—no custom code needed. We get native dot-notation access, query scopes for nested JSON, and automatic serialization/deserialization. With active maintenance (Laravel 6–13 support, PHP 8+), Spatie’s reputation means zero maintenance burden. This solves our dynamic data needs in <1 hour of setup versus weeks of custom development."

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