snoopycodex/laravel-set-env-fork
Laravel package fork to set or update environment variables in your .env file at runtime. Useful for installers, admin panels, and setup flows that need to persist config changes (APP_URL, DB settings, etc.) without manual editing.
.env variables (e.g., feature flags, environment-specific settings) without redeployments, reducing operational friction for Laravel apps..env edits..env files fall short..env files are ephemeral or regenerated per instance..env files across environments..env files are regenerated..env files (this package focuses on runtime manipulation, not encryption or security).For Executives:
"This package eliminates a common bottleneck in Laravel deployments: manually editing .env files to adjust configurations. With it, we can update settings like feature flags, API endpoints, or debug modes on-the-fly—without redeploying or coordinating with devops. For example, we could toggle a new payment processor in staging with a single command, then push the change live instantly. It’s a 10x improvement for teams managing multiple environments, reducing errors and speeding up iterations. The cost? Minimal—just a few lines of code and no new infrastructure."
For Engineering:
*"A lightweight, battle-tested fork of laravel-set-env that solves the pain of static .env files in dynamic environments. Here’s why it’s worth adopting:
php artisan config:clear workarounds: Update .env variables via Artisan commands or scripts (e.g., php artisan env:set APP_DEBUG=true).env('APP_ENV', 'staging') in GitHub Actions).For DevOps/SRE:
*"This package reduces toil in managing .env files across environments by enabling programmatic updates. Key use cases:
APP_URL or QUEUE_DRIVER per deployment without rebuilding containers.FEATURE_NEW_CHECKOUT=true in staging without manual edits..env files are ephemeral (e.g., AWS Lambda, Vercel).
Example workflow: Use it in a CI script to set DB_HOST based on the branch name, or override APP_ENV for local testing without hardcoding values."*How can I help you explore Laravel packages today?