sitesource/laravel-polymorphic-settings
Laravel Polymorphic Settings lets you attach flexible key-value settings to any Eloquent model through a polymorphic relationship, with a simple API for storing, retrieving, updating, and managing configuration-like data per record.
get/put/forget), so the buy-side cost is low and the opportunity cost of hand-rolling (schema design, cache invalidation, encryption at rest) is real. A PM can justify "leverage open source for undifferentiated plumbing" with a clear conscience.forget() no-op after external deletion) came from a real downstream integration. That is evidence the package is being hardened against production use cases — relevant to a roadmap decision about whether to lean on it or wrap it.Consider it when:
Look elsewhere when:
Adoption criteria I'd apply: wrap it behind an internal SettingsRepository-style interface on day one; confirm the test suite (129 tests / 217 assertions at v0.1.3) and the upgrade path are acceptable; pin versions; and confirm the team is comfortable forking under MIT if maintenance stalls.
For executives: We have a recurring, low-differentiation need — storing small configuration values per customer, team, or user. Building and maintaining that ourselves is a few weeks of engineering plus ongoing ownership of cache invalidation and encryption. This MIT-licensed package covers exactly that concern with a small integration surface, so we can ship settings-backed features (per-tenant flags, per-user preferences, encrypted integration credentials) sooner and redirect engineering to the parts of the product customers actually pay for. The main risk is maturity — it's an early-stage package — which we mitigate by wrapping it behind our own interface so we can swap or fork it without touching product code.
For engineering: It's a Laravel trait that attaches key-value settings to any Eloquent model, with opt-in encryption per value and transparent caching. The API is small — get/put/forget — and the recent v0.1.3 release fixed two real cache-hygiene bugs found in a downstream integration (stale dotted-key caches after migration, and forget() not invalidating cache when the row was already gone). Known trade-off: literal dotted-key reads now skip the cache and hit the DB once per read, which is fine for our access pattern. We adopt it behind an internal settings interface, pin the version, and keep the escape hatch (disable the cache via env, or fork under MIT) if anything looks shaky. Test coverage at the current release is solid for a package this young.
How can I help you explore Laravel packages today?