makbari/dot-env-editor

An editor for changing dotEnv file content

0.1.4 2017-09-27 07:11 UTC

This package is not auto-updated.

Last update: 2024-11-13 22:13: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