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

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

innoboxrr/laravel-env-editor
============================

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

1.0.0(1y ago)092[2 PRs](https://github.com/innoboxrr/laravel-env-editor/pulls)MITPHPPHP &gt;=8.1CI passing

Since Aug 25Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/innoboxrr/laravel-env-editor)[ Packagist](https://packagist.org/packages/innoboxrr/laravel-env-editor)[ RSS](/packages/innoboxrr-laravel-env-editor/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (5)Versions (4)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d28d892165e79308acd9f0045fe4f7cfe1f01b3117fbc208e940d50ffae09cda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e6e6f626f7872722f6c61726176656c2d656e762d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innoboxrr/laravel-env-editor)[![Total Downloads](https://camo.githubusercontent.com/b05ed18c718a5324c89e8510af5b48aebf8ed8703fea2e50cbb6525b0ad96b07/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e6e6f626f7872722f6c61726176656c2d656e762d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/innoboxrr/laravel-env-editor)[![Coverage Status](https://camo.githubusercontent.com/7d24f440adbafcf3c475c586b90e8f74ecfdc0e8d389c6ed86a7a34d4613f9ca/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f496e6e6f626f7872722f4c61726176656c2d456e76456469746f722f62616467652e737667)](https://coveralls.io/github/Innoboxrr/Laravel-EnvEditor)[![Codacy Badge](https://camo.githubusercontent.com/fb0707073c97d7525143604fb42a19ea1548bbf80d3a47fe6c847804d4999917/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6264623361376235386235643465666339646266303762653939616538346466)](https://www.codacy.com/manual/innoboxrr/Laravel-EnvEditor?utm_source=github.com&utm_medium=referral&utm_content=Innoboxrr/Laravel-EnvEditor&utm_campaign=Badge_Grade)[![Maintainability](https://camo.githubusercontent.com/28b264be86472bcd56143dc37361a3257e08b0b6a733fbb8a9148b84ff12ea1b/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66343934633732393261663330306230633766632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/Innoboxrr/Laravel-EnvEditor/maintainability)[![License](https://camo.githubusercontent.com/1d52314f8917237832965057d726db8062d4d3da600dca27f4f1d13164396b84/68747470733a2f2f706f7365722e707567782e6f72672f696e6e6f626f7872722f6c61726176656c2d656e762d656469746f722f6c6963656e7365)](https://packagist.org/packages/innoboxrr/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 innoboxrr/laravel-env-editor
    ```
2. Publish assets

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

    This will publish all files:

    - config -&gt; env-editor.php
    - views -&gt; resources/views/vendor/env-editor/..
    - lang -&gt; resources/lang/vendor/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=Innoboxrr\EnvEditor\ServiceProvider --tag=config
    ```

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

[](#available-methods)

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

Example```

 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)

**Note:** user interface is disabled be default. You can enable it by changing the configuration option `env-editor.route.enable`

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

32

—

LowBetter than 69% of packages

Maintenance52

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

678d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12868727?v=4)[Homero Raul](/maintainers/hrauvc)[@hrauvc](https://github.com/hrauvc)

---

Top Contributors

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

---

Tags

laravellaravel-env-editorEnvEditorinnoboxrr

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[geo-sot/laravel-env-editor

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

85120.3k5](/packages/geo-sot-laravel-env-editor)[firefly-iii/data-importer

Firefly III Data Import Tool.

8045.8k](/packages/firefly-iii-data-importer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k31](/packages/ronasit-laravel-helpers)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)

PHPackages © 2026

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