brotzka/laravel-dotenv-editor
Laravel Dotenv Editor lets you read, update, and manage your .env file directly from your application, making it easy to edit environment variables from an admin panel without server access. Clean, fluent API for getting, setting, deleting, and saving keys and values. Simple to install.
.env on a server, this directly attacks the largest recurring support ticket category. Quantify it: tickets per month × engineer minutes × loaded cost is usually the entire business case..env at runtime is a genuine operational trade-off (plaintext secrets, no audit trail, config-cache invalidation, file-permission failures). The PM owns the call on which variables are in-scope — typically integration credentials and toggles, never anything that changes app bootstrapping.Adopt when most of the following are true:
config:clear / cache-bust step after save..env — bare metal, a VM, or a persistent volume. Not an immutable/ephemeral container image.Look elsewhere when:
.env cannot express tenant isolation..env on disk is plaintext and outside your audit boundary..env writes either impossible or silently lost on the next deploy.config:cache in production. Env values are read at boot; runtime edits won't take effect reliably and can produce confusing split-brain behavior across workers.For executives: We have a recurring operational bottleneck — changing a mail or API credential requires an engineer with server access, which generates support load and slows customer onboarding. This is a small, well-established open-source Laravel package that lets us expose those settings in the admin panel in roughly a day of work instead of a multi-week build. It is not a strategic component; it's a commodity utility we should rent rather than own, and it's isolated enough that ripping it out later is cheap. Recommendation: adopt it behind an allowlist and admin-only access, and do not extend it to per-customer or compliance-sensitive secrets, where a database-backed or vault-based store is the correct answer.
For engineering: Add it as a thin adapter, not a pattern. Constrain it with a hardcoded list of editable keys, gate it behind admin authorization and validation, and trigger a config-cache clear on save. Assume the .env is plaintext on disk — so treat which keys go in it as a security decision, not a convenience one. Known constraints to design around: no audit log, no atomicity across concurrent saves, and unpredictable behavior under Octane or cached config. Last upstream release was early 2023, so plan for the possibility of vendoring or forking if we end up depending on it in a critical path.
One-line version: Rent, don't build, the .env editor — but scope it to admin-editable integration settings on single-tenant deployments, and put the secrets that matter somewhere else.
How can I help you explore Laravel packages today?