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

qcod/laravel-app-settings

Add a settings manager with UI to your Laravel app. Settings are stored in the database and cached for zero-query performance, with configurable inputs, sections, and styling (Bootstrap 4 by default). Includes a facade for easy access.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Laravel-only package: ServiceProvider + Facade + setting() helper, DB-backed key/value store with a cache layer on top of qcod/laravel-settings. It fits a monolithic Laravel app that needs a small admin surface for runtime-editable configuration.
  • The "schema" is a PHP config array (sections → inputs → name/type/label/rules/default). That is genuinely good for a TPM: settings become versioned, code-reviewed artifacts rather than tribal knowledge in .env.
  • Poor fit for API-only services, non-Laravel components, or heavy multi-tenant-by-domain setups where settings must be resolved per-request context cheaply and safely.
  • UI is a Blade partial with Bootstrap 4 class defaults, fully remappable via CSS class keys — design-system porting is config work, not a fork.

Integration feasibility

  • Install is trivial (composer require, publish config, php artisan migrate). Auto-discovery covers Laravel 5.5+, so no bootstrap edits on modern versions.
  • Two viable adoption tiers: (a) helper-only key/value store with no UI or sections; (b) full sectioned admin UI. Tier (a) is a half-day spike; tier (b) is the real project.
  • The package does not require you to use its route — you can render @include('app_settings::_settings') inside your own layout, which is the escape hatch for auth and auditability.

Technical risk (ranked)

  1. Unauthenticated write surface. The README's default route is /settings with no documented middleware. Until verified, assume any visitor can rewrite app configuration — SMTP, feature flags, file paths. This is a release blocker, not a nice-to-have.
  2. Secret leakage to the browser. The README recommends window.App = { settings: setting()->all() } inside a raw {!! !!} block. If any secret (API key, SMTP password) is a setting, it is now in page source, view cache, and any CDN/log that captures HTML.
  3. Closures in a config file vs. php artisan config:cache. Dynamic options closures, mutator closures, and 'setting_group' => fn() => auth()->id() cannot be serialized by Laravel's config cache. Production deployments typically cache config; this can break deploys or silently change behavior. Needs a spike, not an assumption.
  4. Plaintext secrets at rest. No documented encryption, audit trail, or rollback. Values live in a DB table and in the cache store.
  5. Cache coherence. "Zero SQL" reads are great, but a save on node A must invalidate nodes B/C and long-lived queue workers. Depends on cache driver (redis/memcached vs. file) and whether the package uses tags.
  6. Destructive default. remove_abandoned_settings deletes input fields not defined in config — a config rename can silently drop a value.
  7. Ecosystem signal. 339 stars, 0 dependents, Travis CI badges (long dead). No third-party validation of the upgrade path. composer.json support for Laravel 10/11/12 and PHP 8.2+ is unverified.
  8. Documentation drift. README alternates AppSetting::get and AppSettings::get; maturity is readme/changelog/releases only, no docs site.

Key questions to answer before committing

  • Is there a middleware/auth config for the settings route, and can the route be disabled entirely?
  • Exact Laravel/PHP constraint matrix and whether tests run against the versions we use.
  • Cache invalidation mechanism and driver assumptions; behavior with config:cache enabled.
  • Is per-key encryption, change history, or rollback supported or planned?
  • Upload handling: which disk, what cleanup, what happens on multi-instance/ephemeral filesystems?
  • Is remove_abandoned_settings default-on or default-off?
  • Maintainer responsiveness and bus factor; is a fork acceptable if it stalls?

Integration Approach

Stack fit

  • Requires a migrated settings table and a published config. If we already read tunables from config()/.env, this package displaces that pattern — plan a fallback ordering (setting($key) ?? config($key)) rather than a hard cutover.
  • Verify version constraints against our Laravel/PHP before any code is written; a mismatch turns this into a fork-and-maintain project, which changes the cost calculus entirely.

Security-first integration (non-negotiable)

  • Do not enable the package route as-is. Register our own controller and route inside the existing admin middleware group, and render the package partial into our layout. Authz, 2FA, and audit then match the rest of the admin, and the package becomes a view + persistence library rather than a perimeter.
  • Never expose setting()->all() to JavaScript. Maintain an explicit allowlist of public keys and emit with @json/Js::from, not raw {!! !!}.
  • Keep secrets (SMTP passwords, API keys, payment keys) in env/secret manager. If a secret must be DB-backed, wrap it in our own encrypted accessor layer — do not store it plaintext through this package.

Theming

  • Map section_class, section_heading_class, input_class, input_error_class, input_invalid_class, input_hint_class, submit_btn_text to our design system (Tailwind or Bootstrap 5) once, in config. Budget a short visual QA pass on file previews, boolean radios, checkbox groups, and validation error feedback — those are the components most likely to look wrong after remapping.

Migration path and sequencing

  1. Week 1 — spike in a branch. Install, migrate against a DB copy, verify config:cache behavior, verify route/middleware options, verify upload disks. Kill criterion: if closures break config caching and no class-string alternative exists, we scope to helper-only or pick an alternative.
  2. Week 2 — helper-only adoption. One low-risk, non-secret setting end-to-end with remove_abandoned_settings => false. Prove cache invalidation across two app instances and a queue worker.
  3. Week 3 — admin surface. Own route + controller + admin middleware + write audit log + validation rules expressed in the config schema.
  4. Week 4 — secret and JS exposure review. Allowlist public settings, confirm no secret reaches HTML or logs, confirm encryption for anything sensitive.
  5. Week 5 — decommission env keys for migrated settings, keeping the fallback read path for one release cycle as rollback.

Compatibility checks

  • Blade partial compiles under our layout (section/yield names, asset expectations).
  • Publish tags don't clobber an existing config file.
  • Transitive dependency on qcod/laravel-settings version is pinned and compatible.

Operational Impact

Maintenance and ownership

  • Small code footprint, MIT license, single-maintainer signal. Mitigation: wrap all reads/writes behind an internal SettingsRepository interface so the blast radius of swapping to spatie/laravel-settings or a bespoke table is one file. Pin the version; budget 1–2 days for a fork-and-patch contingency.
  • Assign a named owner for config/app_settings.php. Enforce a review rule: every new setting requires rules, data_type, a default, a hint, and a line in the runbook. Schema sprawl — dozens of undocumented keys — is the most likely long-term failure, not code defects.

Scaling

  • Reads are cache-served with rare writes, so read scaling is a non-issue. The scaling risk is coherence: shared cache (redis/memcached) required for multi-node, and workers holding stale settings must be considered (restart on deploy, or short TTLs).
  • Per-user groups (user_{id}) grow rows linearly with user count. Fine at thousands; needs a pruning strategy at hundreds of thousands.

Failure modes to monitor

  1. Unauthenticated /settings → total configuration takeover. Single highest-severity item.
  2. Secret surfaced to browser or log via a wholesale settings dump.
  3. config:cache deploy failure or silently wrong dynamic options from closures.
  4. Stale cache after save on another node or in queue workers.
  5. remove_abandoned_settings deleting a value after an input rename.
  6. Deploy ordering: settings read during provider boot before the table exists or before DB is reachable.
  7. Uploaded images living on an ephemeral or per-instance disk, 404ing after redeploy.

Ramp-up

  • Consumer ramp-up is near-zero (setting('key', $default)); author ramp-up is moderate — input types, data_type casting, mutators, disk/path config, and theming keys. A mid-level Laravel developer is productive in a day.
  • The real effort is the guardrails: auth wiring, secret policy, cache coherence, audit logging. Provide a "how to add a setting" runbook and a test pattern (set in test, flush/refresh cache, assert via helper) so settings don't become untested magic.

Observability

  • Add our own write logging (who, what key, old → new value) in the wrapping controller — the package ships no audit trail or rollback.
  • Alert on settings-table writes outside expected windows, 5xx on the settings route, and cache hit-ratio drops.

Decision framing

  • Approve for internal admin configuration on a Laravel monolith, behind our own auth/middleware, wrapped in an abstraction layer, with secrets excluded.
  • Reject as-is for anything storing credentials, regulated or multi-tenant data, or apps where closure-based dynamic options are load-bearing under config:cache.
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.
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json