Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 401 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 401 Bytes

PHP .env editor

A .env file editor library for PHP.

Installation

Using Composer:

composer require k-adam/env-editor

Usage example

$envFile = \EnvEditor\EnvFile::loadFrom(__DIR__."/.env.example");

$envFile->setValue("exampleKey", "exampleValue");
$envFile->setValue("LOG_DIR", __DIR__."/logs");
// ...

$envFile->saveTo(__DIR__."/.env");