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

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

geo-sot/laravel-env-editor
==========================

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

3.2.0(1y ago)85106.6k—3.4%15[3 PRs](https://github.com/GeoSot/Laravel-EnvEditor/pulls)4MITPHPPHP &gt;=8.1CI passing

Since Oct 24Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/GeoSot/Laravel-EnvEditor)[ Packagist](https://packagist.org/packages/geo-sot/laravel-env-editor)[ RSS](/packages/geo-sot-laravel-env-editor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (29)Used By (4)

[![Latest Version on Packagist](https://camo.githubusercontent.com/216611725d112b241fc3609cf17040c1070565442adf520fa6f7b9aee3d184fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67656f2d736f742f6c61726176656c2d656e762d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geo-sot/laravel-env-editor)[![Total Downloads](https://camo.githubusercontent.com/8ddb9ab5184cde1b6a7da49e0645419c045a6454598d7239ab5b86e20752967d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67656f2d736f742f6c61726176656c2d656e762d656469746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geo-sot/laravel-env-editor)[![Coverage Status](https://camo.githubusercontent.com/28ef570b7ed01902faf1a1f3a8b28e59a6edd0727001a3e4e7964fec748634c6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f47656f536f742f4c61726176656c2d456e76456469746f722f62616467652e737667)](https://coveralls.io/github/GeoSot/Laravel-EnvEditor)[![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. 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/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=GeoSot\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

61

—

FairBetter than 99% of packages

Maintenance71

Regular maintenance activity

Popularity49

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 84.7% 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 ~102 days

Recently: every ~180 days

Total

24

Last Release

399d ago

Major Versions

v0.9.12 → v1.0.02022-01-13

v1.1.0 → 2.0.02022-03-28

2.1.1 → 3.0.02024-04-13

PHP version history (7 changes)0.9.0PHP ^7.0

v0.9.8PHP ^7.1

v0.9.12PHP &gt;=7.1

v1.0.0PHP &gt;=7.3

2.0.0PHP ^8

2.1.0PHP &gt;=8.0

3.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/01f0302949a697fba6b5143c087fe3fdbe9396167c080728a433be88a51d4959?d=identicon)[geo.sotis@gmail.com](/maintainers/geo.sotis@gmail.com)

---

Top Contributors

[![GeoSot](https://avatars.githubusercontent.com/u/22406063?v=4)](https://github.com/GeoSot "GeoSot (94 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![nguyentranchung](https://avatars.githubusercontent.com/u/9611224?v=4)](https://github.com/nguyentranchung "nguyentranchung (2 commits)")[![itcyborg](https://avatars.githubusercontent.com/u/22530253?v=4)](https://github.com/itcyborg "itcyborg (1 commits)")[![geo-sot](https://avatars.githubusercontent.com/u/114676003?v=4)](https://github.com/geo-sot "geo-sot (1 commits)")[![ArnoldNicole](https://avatars.githubusercontent.com/u/45710585?v=4)](https://github.com/ArnoldNicole "ArnoldNicole (1 commits)")[![Rikj000](https://avatars.githubusercontent.com/u/24852597?v=4)](https://github.com/Rikj000 "Rikj000 (1 commits)")

---

Tags

env-backupguilaravellaravel-5-packagelaravel-env-editorvuejs2laravelgeo-sotlaravel-env-editorEnvEditor

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nickurt/laravel-akismet

Akismet for Laravel 11.x/12.x/13.x

97139.6k2](/packages/nickurt-laravel-akismet)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[geo-sot/filament-env-editor

Access .env file though Filament admin panel

2432.3k1](/packages/geo-sot-filament-env-editor)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)

PHPackages © 2026

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