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.
Architecture fit
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.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.Integration feasibility
composer require, publish config, php artisan migrate). Auto-discovery covers Laravel 5.5+, so no bootstrap edits on modern versions.@include('app_settings::_settings') inside your own layout, which is the escape hatch for auth and auditability.Technical risk (ranked)
/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.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.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.remove_abandoned_settings deletes input fields not defined in config — a config rename can silently drop a value.composer.json support for Laravel 10/11/12 and PHP 8.2+ is unverified.AppSetting::get and AppSettings::get; maturity is readme/changelog/releases only, no docs site.Key questions to answer before committing
config:cache enabled.remove_abandoned_settings default-on or default-off?Stack fit
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.Security-first integration (non-negotiable)
setting()->all() to JavaScript. Maintain an explicit allowlist of public keys and emit with @json/Js::from, not raw {!! !!}.Theming
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
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.remove_abandoned_settings => false. Prove cache invalidation across two app instances and a queue worker.Compatibility checks
qcod/laravel-settings version is pinned and compatible.Maintenance and ownership
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.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
user_{id}) grow rows linearly with user count. Fine at thousands; needs a pruning strategy at hundreds of thousands.Failure modes to monitor
/settings → total configuration takeover. Single highest-severity item.config:cache deploy failure or silently wrong dynamic options from closures.remove_abandoned_settings deleting a value after an input rename.Ramp-up
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.Observability
Decision framing
config:cache.How can I help you explore Laravel packages today?