PHPackages                             brotzka/laravel-dotenv-editor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. brotzka/laravel-dotenv-editor

ActiveLibrary

brotzka/laravel-dotenv-editor
=============================

A package for editing the .env file in your Laravel root.

v2.2.0(3y ago)375157.7k↓30.6%79[18 issues](https://github.com/Brotzka/laravel-dotenv-editor/issues)4MITPHPPHP &gt;=5.5.9

Since May 12Pushed 3y ago9 watchersCompare

[ Source](https://github.com/Brotzka/laravel-dotenv-editor)[ Packagist](https://packagist.org/packages/brotzka/laravel-dotenv-editor)[ RSS](/packages/brotzka-laravel-dotenv-editor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (22)Used By (4)

[![Codacy Badge](https://camo.githubusercontent.com/c91d47fe57ef7fcad1933974f207275aad1297cfa00e954e5e864dbf080254cc/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3236633133626130393138633432383538656336663934363037323338626161)](https://www.codacy.com/app/fabianhagen87/laravel-dotenv-editor?utm_source=github.com&utm_medium=referral&utm_content=Brotzka/laravel-dotenv-editor&utm_campaign=badger)[![Latest Stable Version](https://camo.githubusercontent.com/e57f136ce939ab6874b286d5c426fba8d3fa29625298da4d59cdd126f9082458/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f6c61726176656c2d646f74656e762d656469746f722f762f737461626c65)](https://packagist.org/packages/brotzka/laravel-dotenv-editor)[![Total Downloads](https://camo.githubusercontent.com/7f03183aec14413625984ca881bec76f888e1795bdaf0d010a7b49f541aefe0c/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f6c61726176656c2d646f74656e762d656469746f722f646f776e6c6f616473)](https://packagist.org/packages/brotzka/laravel-dotenv-editor)[![Latest Unstable Version](https://camo.githubusercontent.com/f8b174fd1fdd056b27231319b050f96e824fdb7eb2fdc9567d272471e50fbd44/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f6c61726176656c2d646f74656e762d656469746f722f762f756e737461626c65)](https://packagist.org/packages/brotzka/laravel-dotenv-editor)[![License](https://camo.githubusercontent.com/d9b2c242a10c6e1959fb6aa164044debbd2c920a637f5b64296f82d2d41bd7fd/68747470733a2f2f706f7365722e707567782e6f72672f62726f747a6b612f6c61726176656c2d646f74656e762d656469746f722f6c6963656e7365)](https://packagist.org/packages/brotzka/laravel-dotenv-editor)

Edit your Laravel .env file
===========================

[](#edit-your-laravel-env-file)

This package offers you the possibility to edit your .env dynamically through a controller or model.

The current version (2.x) ships with a graphical user interface based on VueJS to offer you a very simple implementation of all features.

List of available functions:

- check, if a given key exists
- get the value of a key
- get the complete content of your .env
- get the content as JSON
- change existing values
- add new key-value-pairs
- delete existing key-value-pairs
- create/restore/delete backups
- list all backups
- get the content of a backup
- enable auto-backups
- check, if auto-backups are enabled or not
- get and set a backup-path

Here are some images showing the gui which ships with the current version:

[![Overview](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_01.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_01.png)[![Overview with loaded content](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_02.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_02.png)[![Edit an entry](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_08.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_08.png)[![Adding a new key-value-pair](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_03.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_03.png)[![Backups](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_04.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_04.png)[![Showing the content of a backup](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_06.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_06.png)[![More options for backups](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_07.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_07.png)[![Uploading Backups](https://github.com/Brotzka/laravel-dotenv-editor/raw/master/images/screenshot_05.png)](https://github.com/Brotzka/laravel-dotenv-editor/blob/master/images/screenshot_05.png)

Installation
============

[](#installation)

Visit the [Wiki-page](https://github.com/Brotzka/laravel-dotenv-editor/wiki/Installation) to get more Information.

Examples
--------

[](#examples)

The following example shows an controller with a method, in which we change some values from the .env. Make sure, the entries you want to change, really exist in your .env.

```
namespace App\Http\Controllers;

use Brotzka\DotenvEditor\DotenvEditor;

class EnvController extends Controller
{
    public function test(){
        $env = new DotenvEditor();

        $env->changeEnv([
            'TEST_ENTRY1'   => 'one_new_value',
            'TEST_ENTRY2'   => $anotherValue,
        ]);
    }
}

```

For more exmaples visit the Wiki.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity54

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 58% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Recently: every ~418 days

Total

21

Last Release

1205d ago

Major Versions

v1.2 → v2.0.02016-07-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e79668a526d6c7a15278bdf89f8c04daa19d9bbcb61ea788a4f1fc630603faf?d=identicon)[Brotzka](/maintainers/Brotzka)

---

Top Contributors

[![Brotzka](https://avatars.githubusercontent.com/u/9106911?v=4)](https://github.com/Brotzka "Brotzka (65 commits)")[![nguyentranchung](https://avatars.githubusercontent.com/u/9611224?v=4)](https://github.com/nguyentranchung "nguyentranchung (13 commits)")[![HepplerDotNet](https://avatars.githubusercontent.com/u/12952240?v=4)](https://github.com/HepplerDotNet "HepplerDotNet (6 commits)")[![elegasoft](https://avatars.githubusercontent.com/u/16218581?v=4)](https://github.com/elegasoft "elegasoft (3 commits)")[![sado729](https://avatars.githubusercontent.com/u/22997209?v=4)](https://github.com/sado729 "sado729 (3 commits)")[![mckaragulle](https://avatars.githubusercontent.com/u/28902560?v=4)](https://github.com/mckaragulle "mckaragulle (3 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (2 commits)")[![VegaTom](https://avatars.githubusercontent.com/u/25960724?v=4)](https://github.com/VegaTom "VegaTom (2 commits)")[![jozefbalun](https://avatars.githubusercontent.com/u/8630488?v=4)](https://github.com/jozefbalun "jozefbalun (2 commits)")[![RobertGrijVerdzc](https://avatars.githubusercontent.com/u/41878918?v=4)](https://github.com/RobertGrijVerdzc "RobertGrijVerdzc (1 commits)")[![Tjoosten](https://avatars.githubusercontent.com/u/5157609?v=4)](https://github.com/Tjoosten "Tjoosten (1 commits)")[![ujjwalwahi](https://avatars.githubusercontent.com/u/1370255?v=4)](https://github.com/ujjwalwahi "ujjwalwahi (1 commits)")[![ajaythakkar](https://avatars.githubusercontent.com/u/24631798?v=4)](https://github.com/ajaythakkar "ajaythakkar (1 commits)")[![vivarock7](https://avatars.githubusercontent.com/u/43610886?v=4)](https://github.com/vivarock7 "vivarock7 (1 commits)")[![apo-bozdag](https://avatars.githubusercontent.com/u/33822884?v=4)](https://github.com/apo-bozdag "apo-bozdag (1 commits)")[![awjudd](https://avatars.githubusercontent.com/u/1910996?v=4)](https://github.com/awjudd "awjudd (1 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![Corvisier](https://avatars.githubusercontent.com/u/202424?v=4)](https://github.com/Corvisier "Corvisier (1 commits)")[![jimmiroblescasanova](https://avatars.githubusercontent.com/u/55005706?v=4)](https://github.com/jimmiroblescasanova "jimmiroblescasanova (1 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (1 commits)")

---

Tags

laraveldotenvdotenv-editor

### Embed Badge

![Health badge](/badges/brotzka-laravel-dotenv-editor/health.svg)

```
[![Health](https://phpackages.com/badges/brotzka-laravel-dotenv-editor/health.svg)](https://phpackages.com/packages/brotzka-laravel-dotenv-editor)
```

###  Alternatives

[jackiedo/dotenv-editor

The .env file editor tool for Laravel 5.8+

2041.2M31](/packages/jackiedo-dotenv-editor)[sixlive/dotenv-editor

A tool to edit phpdotenv files

761.5M11](/packages/sixlive-dotenv-editor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
