dragon-code/laravel-model-settings
Store per-model key-value settings in Laravel with dragon-code/laravel-model-settings. Attach typed settings to any Eloquent model, read and write them through a simple API, and keep configuration data with your records without extra tables.
0 (#100) are exactly the edge cases that erode engineering estimates when a team hand-rolls its own settings table. This release makes "use the package" a defensible default answer for the build-vs-buy question.Consider adoption when:
0 (#100). Both are classic sources of silent data bugs.Look elsewhere when:
For executives: This is a Laravel settings package that has just shipped its most substantive release to date. The headline is that it now handles the cases that normally turn a simple "user preferences" feature into a multi-sprint cleanup: typed payloads per model, a real distinction between unset and empty values, correct handling of default values, bulk updates with predictable database load, and validated ownership so one tenant cannot write another's configuration. The rest of the release is documentation and tooling, which lowers onboarding cost but does not change scope. The practical effect on the roadmap is that per-user and per-tenant configuration features can be scheduled as normal feature work rather than as infrastructure projects. The one caveat to state plainly: this is effectively a single-maintainer package. Adopting it is low-cost and reversible, but it should be treated as a dependency we monitor, not one we assume will be maintained on our schedule.
For engineering: The release resolves four sharp edges we would otherwise hit ourselves. #97 allows payload casts to be declared per model and per setting key, so structured settings stop needing bespoke accessors. #101 stores blank JSON explicitly, and #100 separates persistent defaults from model ID 0 — together these remove a class of "is this unset or is it empty?" bugs that are painful to find in production. #96 adds bulk mutations with bounded queries and an overridable purge, which makes admin bulk edit and tenant provisioning safe to build on top of. #102 replaces package logging with typed bulk mutation exceptions, so bulk failures become catchable and testable rather than log-scraped. #95 hardens settings owner validation, which is the security-relevant item and warrants a review of our own owner-resolution logic at the integration boundary. #73 adds commands to generate localization files, useful if we localize settings labels or validation messages. Documentation was rebuilt on Docusaurus with an explicitly documented API and package boundary (#99), so we have a clearer contract to code against. Nothing in this release is flagged as breaking; treat the changed items as behavior refinements and re-run our integration tests around defaults and empty payloads before merging the upgrade.
How can I help you explore Laravel packages today?