Dev Tools · 1h ago
DB-Backed Settings Overlay Keeps config() as Single Read Path
A developer built a system for Laravel apps that stores admin-editable settings in the database but loads them into config() at boot, so all code continues reading config() as usual. The approach uses spatie/laravel-settings for typed settings classes and overlays values in AppServiceProvider. This avoids the common trap of having two read paths that can get out of sync.
Meridian48 take
Practical pattern for apps that need admin configurability without refactoring, but the boot-time overlay could mask stale config if not carefully cached.
laravelconfiguration-management