sunel/eav
Sunel/EAV brings flexible Entity-Attribute-Value modeling to Laravel. Attach dynamic attributes to Eloquent models without constant migrations, store typed values, and query entities by custom attributes—ideal for catalogs, CMS data, and configurable products.
sunel/eav is effectively "buy the pattern, own the code" — it saves maybe 2–4 weeks of schema/validation scaffolding but adds a dependency you will likely fork.Consider it when:
Look elsewhere when:
spatie/laravel-schemaless-attributes, or native Postgres JSONB) solve with far less complexity and better query ergonomics.To executives: This is a small, low-cost option for one specific problem — letting customers define their own fields without us shipping a database migration every time. It is not a strategic platform bet. The package has modest adoption (153 stars) and has not been released since September 2018, so I'm recommending we use it, if at all, to validate the feature quickly and budget for replacing or owning it. Expect a modest time saving up front and an ongoing maintenance line item; the alternative — native JSON columns plus our own validation — is more work now but materially less risk.
To engineering: It gives us entity types, typed attribute definitions, value storage, and validation on top of Eloquent, which is roughly the scaffolding we'd otherwise write by hand. The catch is that it predates modern Laravel and PHP, so treat it as a starting point, not a library we depend on: fork it, pin it, and write our own acceptance tests around attribute CRUD, casting, and query performance before it touches a production schema. If we're on Laravel 10+, the honest comparison is JSON/JSONB columns or a maintained schemaless package, and I'd like that decision made explicitly rather than by default.
How can I help you explore Laravel packages today?