PHPackages                             itcyborg/laravel-env-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. itcyborg/laravel-env-editor

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

itcyborg/laravel-env-editor
===========================

A laravel Package that supports .Env File, editing and backup

08PHP

Since Feb 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/itcyborg/laravel-env-editor)[ Packagist](https://packagist.org/packages/itcyborg/laravel-env-editor)[ RSS](/packages/itcyborg-laravel-env-editor/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Codacy Badge](https://camo.githubusercontent.com/fb0707073c97d7525143604fb42a19ea1548bbf80d3a47fe6c847804d4999917/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6264623361376235386235643465666339646266303762653939616538346466)](https://www.codacy.com/manual/geo.sotis/Laravel-EnvEditor?utm_source=github.com&utm_medium=referral&utm_content=GeoSot/Laravel-EnvEditor&utm_campaign=Badge_Grade)[![Maintainability](https://camo.githubusercontent.com/28b264be86472bcd56143dc37361a3257e08b0b6a733fbb8a9148b84ff12ea1b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66343934633732393261663330306230633766632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/GeoSot/Laravel-EnvEditor/maintainability)[![License](https://camo.githubusercontent.com/36c22407c1338f9d688f7305c4e090c46f39fa3cd57d2fa4e52bd5990e071e4d/68747470733a2f2f706f7365722e707567782e6f72672f67656f2d736f742f6c61726176656c2d656e762d656469746f722f6c6963656e7365)](https://packagist.org/packages/geo-sot/laravel-env-editor)

Laravel .env Editor (plus GUI)
==============================

[](#laravel-env-editor-plus-gui)

This Package allows to manage Laravel .env file values on the Fly (add, edit, delete keys), upload another .env or create backups
Management can be done through the user interface, or programmatically by using the `EnvEditor` Facade, without breaking the files structure.
The inspiration for this package was -, [Brotzka/laravel-dotenv-editor](https://github.com/Brotzka/laravel-dotenv-editor).

- [Installation](#installation)
- [Available Methods](#available_methods)
- [User Interface](#user_interface)

    Installation:
    -----------------------------------------------------

    [](#installation)

1. Install package

    ```
    composer require geo-sot/laravel-env-editor
    ```
2. Edit config/app.php (*Skip this step if you are using laravel 5.5+*) Service provider:

    ```
    GeoSot\EnvEditor\ServiceProvider::class
    ```

    Class aliases:

    ```
    'EnvEditor' => GeoSot\\EnvEditor\\Facades\\EnvEditor::class
    ```
3. Publish assets

    ```
    php artisan vendor:publish --provider=GeoSot\EnvEditor\ServiceProvider
    ```

    This will publish all files:

    - config -&gt; env-editor.php
    - views -&gt; resources/views/vendor/geo-sot/env-editor/..
    - lang -&gt; resources/lang/vendor/geo-sot/env-editor.php

    Or publish specific tags

    ```
     //Publish specific tag
     php artisan vendor:publish --tag=config
     php artisan vendor:publish --tag=translations
     php artisan vendor:publish --tag=views

     //Publish specific Tag from this Vendor
     php artisan vendor:publish --provider=GeoSot\EnvEditor\ServiceProvider --tag=config
    ```

Available Methods:
---------------------------------------------------------------

[](#available-methods)

> - getEnvFileContent
> - keyExists
> - getKey
> - addKey
> - editKey
> - deleteKey
> - getAllBackUps
> - upload
> - backUpCurrent
> - getFilePath
> - deleteBackup
> - restoreBackUp

```

 EnvEditor::getEnvFileContent($fileName='')
 // Return The .env Data as Collection.
 // If FileName Is provided it searches inside backups Directory and returns these results

 EnvEditor::keyExists($key)
 // Search key existance in .env

 EnvEditor::getKey(string $key, $default = null)
 // Get key value from .env,

  EnvEditor::addKey($key, $value, array $options = [])
  // Adds new Key in .env file
  // As options can pass ['index'=>'someNumericIndex'] in order to place the new key after an other and not in the end,
  // or ['group'=>'MAIL/APP etc'] to place the new key oat the end of the group

  EnvEditor::editKey($key, $value)
  // Edits existing key value

  EnvEditor::deleteKey($key)

  EnvEditor::getAllBackUps()
  // Returns all Backup files as collection with some info like, created_date, content etc.

  EnvEditor::upload(UploadedFile $uploadedFile, $replaceCurrentEnv)
  // Gets an UploadedFile and stores it as backup or as current .env

  EnvEditor::backUpCurrent()
  // Backups current .env

  EnvEditor::getFilePath($fileName = '')
  // Returns the full path of a backup file.
  // If $fileName is empty returns the full path of the .env file

  EnvEditor::deleteBackup($fileName)

  EnvEditor::restoreBackUp()

```

User Interface
--------------------------------------------------------

[](#user-interface)

User Interface Contains three Tabs

- [Current .env](#current_env)
    - [Add new Key](#add_key)
    - [Edit Key](#edit_key)
    - [Delete new Key](#delete_key)
- [Backups](#backups)
    - [Backups Index](#backups_index)
    - [Backup file details](#backup_file_details)
- [Upload](#upload)

### Current .env

[](#current-env-)

[![Overview](https://user-images.githubusercontent.com/22406063/73443980-60500600-4360-11ea-9d60-7ddf335cfa11.png)](https://user-images.githubusercontent.com/22406063/73443980-60500600-4360-11ea-9d60-7ddf335cfa11.png)

#### Add new key

[](#add-new-key)

[![AddKey](https://user-images.githubusercontent.com/22406063/73443992-65ad5080-4360-11ea-9311-7ad53a207298.png)](https://user-images.githubusercontent.com/22406063/73443992-65ad5080-4360-11ea-9311-7ad53a207298.png)

#### Edit key

[](#edit-key)

[![EditKey](https://user-images.githubusercontent.com/22406063/73443996-66de7d80-4360-11ea-879c-365d87b08610.png)](https://user-images.githubusercontent.com/22406063/73443996-66de7d80-4360-11ea-879c-365d87b08610.png)

#### Delete key

[](#delete-key)

[![DeleteKey](https://user-images.githubusercontent.com/22406063/73443999-68a84100-4360-11ea-8955-371fcfc0c1b5.png)](https://user-images.githubusercontent.com/22406063/73443999-68a84100-4360-11ea-8955-371fcfc0c1b5.png)

### Backups

[](#backups)

#### Backups Index

[](#backups-index)

[![Overview](https://user-images.githubusercontent.com/22406063/73444004-6a720480-4360-11ea-9260-2f3978b828ca.png)](https://user-images.githubusercontent.com/22406063/73444004-6a720480-4360-11ea-9260-2f3978b828ca.png)

#### Backup file details

[](#backup-file-details)

[![Overview](https://user-images.githubusercontent.com/22406063/73444009-6c3bc800-4360-11ea-9f36-5d50571a84aa.png)](https://user-images.githubusercontent.com/22406063/73444009-6c3bc800-4360-11ea-9f36-5d50571a84aa.png)

### Upload

[](#upload)

[![Overview](https://user-images.githubusercontent.com/22406063/73444015-6e058b80-4360-11ea-80b0-c60f837392ba.png)](https://user-images.githubusercontent.com/22406063/73444015-6e058b80-4360-11ea-80b0-c60f837392ba.png)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/bfe044f0607bfd4dcff3f0d1424ee17c53778575bfa4fdd75dd25bef6195550d?d=identicon)[itcyborg](/maintainers/itcyborg)

---

Top Contributors

[![itcyborg](https://avatars.githubusercontent.com/u/22530253?v=4)](https://github.com/itcyborg "itcyborg (2 commits)")

### Embed Badge

![Health badge](/badges/itcyborg-laravel-env-editor/health.svg)

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

PHPackages © 2026

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