PHPackages                             mgip/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mgip/laravel-dotenv-editor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mgip/laravel-dotenv-editor
==========================

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

016PHP

Since Aug 9Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![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

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 57.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bca5fa08e4334f7e9636d7c290fcabf8adc4e5b2458fcd74814d67829abfa868?d=identicon)[morffe](/maintainers/morffe)

---

Top Contributors

[![Brotzka](https://avatars.githubusercontent.com/u/9106911?v=4)](https://github.com/Brotzka "Brotzka (56 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)")[![mckaragulle](https://avatars.githubusercontent.com/u/28902560?v=4)](https://github.com/mckaragulle "mckaragulle (3 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)")[![mgip](https://avatars.githubusercontent.com/u/46616108?v=4)](https://github.com/mgip "mgip (2 commits)")[![sado729](https://avatars.githubusercontent.com/u/22997209?v=4)](https://github.com/sado729 "sado729 (2 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (2 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![Tjoosten](https://avatars.githubusercontent.com/u/5157609?v=4)](https://github.com/Tjoosten "Tjoosten (1 commits)")[![awjudd](https://avatars.githubusercontent.com/u/1910996?v=4)](https://github.com/awjudd "awjudd (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)")[![r4v](https://avatars.githubusercontent.com/u/248192?v=4)](https://github.com/r4v "r4v (1 commits)")[![martin-sanjuan](https://avatars.githubusercontent.com/u/1911368?v=4)](https://github.com/martin-sanjuan "martin-sanjuan (1 commits)")

### Embed Badge

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

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

###  Alternatives

[cubear/finder

Finder is a Drupal 8 module to help users find services which meet their criteria

404.2k](/packages/cubear-finder)

PHPackages © 2026

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