r94ever/laravel-model-setting
r94ever/laravel-model-setting lets Laravel Eloquent models carry their own flexible key-value settings. Add the trait, then store and retrieve per-model configuration through a simple API, avoiding extra boilerplate while keeping settings close to the models that use them.
whereSetting() query scope implies settings stored alongside (or queryable with) Eloquent models. That lets you treat "settings" as a first-class, queryable part of your data model rather than scattering json_decode calls and ad-hoc whereJsonContains clauses through your codebase.beta_ui is enabled"). This is a roadmap enabler: it makes per-account feature flags a data query instead of a config-file deployment.whereSetting() scope is real, in use, and now behaves as documented; and the package is being maintained rather than abandoned. Both are inputs to a dependency-risk decision, not a feature decision.whereSetting(), that call path was returning incorrect results. Treat the bump to 1.0.1 as a bug fix to schedule, not a nice-to-have.Adopt when most of these hold:
composer.json.Look elsewhere when:
spatie/laravel-settings is the better-known fit for that problem, and it solves a different one.A small, single-purpose Laravel dependency that makes stored settings queryable, so features like per-account toggles, plan-based access, and preference-filtered views become ordinary database queries instead of one-off code in each feature. It carries low lock-in: the surface area we would use is essentially one scope method, so the cost of removing it later is measured in hours, not sprints.
The latest release, 1.0.1, is a patch that fixes a bug in the whereSetting() scope — no new features, no breaking changes, no migration work. The practical read is that the package is actively maintained, and that anyone on 1.0.0 using that scope was getting wrong results and should upgrade.
Recommendation: worth a time-boxed spike in one service where we already hand-roll settings filtering. Success criteria are narrow — correct results, an acceptable query plan on production-sized tables, and a diff that deletes more custom query code than it adds. If the spike clears those bars, adopt; if the JSON filtering does not index well at our scale, we keep the pattern and drop the dependency.
How can I help you explore Laravel packages today?