Weave 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 Settings Laravel Package

npabisz/laravel-settings

Store and manage Laravel application settings with a simple, persistent API. Define settings in code or the database, retrieve them anywhere via helpers or a facade, and rely on caching for fast access. Ideal for feature flags, site options, and admin-editable values that change without redeploying.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Scope of this assessment. No prior assessment exists and no repository data was supplied; this evaluation is derived from the v1.2.0 release note ("Configurable Setting model class (DDD support)") and standard conventions for Laravel configuration-driven packages. Findings below should be validated against the package's README, config/*.php, and test suite before adoption.

Architecture fit. The package follows the conventional Laravel shape: a service provider, a publishable config file, and an Eloquent-backed settings store. Prior to v1.2.0 the settings model class was almost certainly hard-coded or resolved from a fixed binding, which forces every consuming application's settings persistence into the package's namespace. That is a structural mismatch for teams applying Domain-Driven Design or modular monolith patterns (e.g. nwidart/laravel-modules, bounded contexts per namespace), where persistence models must live with their domain rather than in vendor code. Making the model class configurable moves the package from "opinionated scaffolding" to "pluggable persistence," which is the correct direction: it lets the domain own the entity while the package retains the resolution, casting, and caching behaviour. This is an architectural improvement, not a feature toggle.

Integration feasibility. Low effort for the default path, moderate for the DDD path. Applications that never touch the new key continue to resolve the package's own model, so the change is additive. Teams that adopt it must supply a class that honours an implicit or explicit contract — typically extending the package's base model or implementing an interface — plus a matching table name, cast definitions (JSON, encrypted, enum), and primary key/connection settings. The real cost is not code, it is the data migration if the new model points at a differently named table. Config caching means the swap is a deploy-time concern, not a runtime one.

Technical risk. Moderate-low, with three specific exposures. First, contract durability: if the package requires subclassing rather than implementing an interface, the custom model inherits vendor internals and becomes a breaking-change surface on every minor release. Second, silent misconfiguration: a class string that fails to resolve surfaces at container build or first query, and a resolved model missing the package's casts fails silently — settings written as arrays or encrypted values can be persisted or read incorrectly without an exception. Third, version-coupling of the config schema: the new key may be absent from previously published config files, so upgrades require republishing or manually diffing config. The v1.2.0 version number implies additive, backwards-compatible change, but semantic-versioning discipline in small packages is inconsistent.

Key questions.

  1. Is the configurable model contract an interface, an abstract base class, or duck-typed?
  2. Is the config key optional with a documented default, and does the README include an upgrade diff for previously published config files?
  3. Does the custom model inherit caching, encryption, and cast behaviour automatically, or must each be re-declared?
  4. Can the table name, connection, and primary key be overridden independently of the class?
  5. Is a single model per application supported, or per-scope/per-tenant model resolution?
  6. What is the supported PHP/Laravel version matrix, and is it covered in CI?
  7. Are there tests demonstrating a model living outside the package namespace?

Integration Approach

Stack fit. Targets standard Eloquent-based Laravel applications. It requires that the consuming app already treats settings as database-backed state; it is not a fit for config-file-only or environment-variable-driven configuration, and it adds a database read on the settings resolution path unless caching is enabled.

Migration path.

  • Non-DDD consumers: pin ^1.2, confirm the previously published config file still resolves, optionally republish and diff. No behavioural change expected.
  • DDD consumers: create the domain model (extending or implementing the package contract), point the config key at it, align the table name with the existing settings table to avoid a data migration, and port any custom casts explicitly. Only if the table is renamed is a data migration required — sequence that as a separate, reversible step.

Compatibility. Additive and config-gated, so the blast radius is limited to apps that opt in. The two compatibility hazards are stale published config files (key missing) and cached config after deploy. Both are deploy-checklist items, not code changes. Downstream packages or internal wrappers that type-hint the package's original model class will need updating if they are expected to work with a substituted model.

Sequencing.

  1. Verify the model contract and the default-resolution behaviour in a scratch branch.
  2. Record an ADR: which bounded context owns settings persistence, and why.
  3. Introduce the domain model with table/connection/casts pinned to current behaviour.
  4. Run the package's existing test suite plus a round-trip test (write, flush cache, read) against the custom model.
  5. Update factories, seeders, and any model-specific references.
  6. Deploy with config cache cleared; verify the resolved class in a staging tinker session.

Operational Impact

Maintenance. The config surface grows by one high-leverage key, and with it a contract the team now owns. Budget a small recurring cost: re-verify the custom model on each package minor release, particularly if it subclasses vendor internals. This is a good trade against forking or patching the package, which is the alternative most DDD teams reach for.

Support. Expect two new ticket classes: "the settings model resolves to the wrong class" (config cache, environment drift, or a stale published config) and "casts are missing on the custom model" (silent data-shape bugs, the more expensive of the two). Both are mitigated by documentation and a startup assertion rather than by process.

Scaling. No meaningful change to query volume or latency; settings resolution remains a single cached Eloquent lookup per scope. The change does make multi-tenant and per-module setups more tractable, since each context can own its model — but only if the package supports per-scope resolution, which is unconfirmed.

Failure modes.

  • Unresolvable class string → container exception at boot or first access; loud and recoverable.
  • Resolvable model lacking required casts → silent corruption of array/encrypted settings; the highest-severity risk here.
  • Stale config cache after deploy → new key ignored, old model used, no error surfaced.
  • Table-name mismatch → missing-table exceptions in production if not exercised in staging.
  • Contract drift on package upgrade → custom model breaks at the parent-class level.

Ramp-up. Low for a mid-level Laravel developer: the mechanics are a config edit plus a model class, roughly half a day including tests. The non-trivial part is organisational — agreeing which bounded context owns settings and enforcing that boundary — which is a design conversation, not a coding one. Recommend the first adoption be paired with a short walkthrough from whoever owns the domain architecture, and that the config key be documented in the team's service inventory so it is not an unexplained magic string six months from now.

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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource