axdlee/laravel-config-writer
Write safely to Laravel config PHP files (Laravel 5.3+), updating nested keys while preserving formatting, comments, and advanced settings. Supports strings, ints, booleans, and single-level arrays. Includes Laravel service provider and standalone Rewrite class.
app.php, database.php) without manual file edits, reducing human error and deployment friction.Adopt when:
.env alone.Look elsewhere if:
config:clear or packages like spatie/laravel-config-array).For Executives: "This package lets us update Laravel configuration files programmatically—think of it like ‘infrastructure as code’ for configs. Instead of manually editing files (which risks errors or security leaks), we can push changes via deployment pipelines or even runtime logic. For example, we could auto-update API endpoints or feature flags without downtime. It’s a low-risk, high-reward way to make our deployments more reliable and our configs more dynamic."
For Engineers: *"This is a lightweight, battle-tested way to write to Laravel config files while keeping comments and formatting intact. Key benefits:
.env or APIs).Config::write('key', 'value')—works in Laravel or standalone.For DevOps/SRE: *"This solves a pain point in deployments: updating configs without SSH or manual steps. Imagine:
How can I help you explore Laravel packages today?