makbari / dot-env-editor
An editor for changing dotEnv file content
Installs: 18 119
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/makbari/dot-env-editor
Requires
- php: >=7.0
- mhndev/config: 1.*
Suggests
- jenssegers/blade: 1.1.0
This package is not auto-updated.
Last update: 2025-10-30 03:17:20 UTC
README
Simple editor for edit .env file content using php
Installation with Composer
curl -s http://getcomposer.org/installer | php
php composer.phar require makbari/dot-env-editor
Usage
All you need to do is to create an object of Handler class and pass it your config path.
Example
$handler = new \makbari\DotEnvEditor\handler\Handler("Path_To_Your_Config"); $handler->add(['key' => 'value']);
Available methods
overview() - To list all .env content
add() - Add new key => value to .env file
update() - Update existing value in .env file
getDetails() - List all .env file content in json format
createBackup() - Create a backup from .env file
deleteBackup() - Delete an existing backup
restore() - Restore backup
delete() - Delete an existing key => value from .env file