Skip to content

M4RKU5-C0D3/dotenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotenv

Latest Version on Packagist Total Downloads

Installation

Install package via composer:

composer require m4rku5/dotenv

Usage

From .env ...

# DOCKER:
DOCKER_PORT=8001

# PROJECT:
#PROJECT_DOCUMENTROOT=public
#PROJECT_LOGS=logs

... doing ...

$dotenv = new Dotenv('.env');
$dotenv->set('PROJECT_DOCUMENTROOT', 'test');
$dotenv->enable('PROJECT_DOCUMENTROOT');
$dotenv->set('HELLO', 'World');
$dotenv->disable('HELLO');
$dotenv->unset('DOCKER_PORT');
$dotenv->save();

... will result in ...

# DOCKER:

# PROJECT:
PROJECT_DOCUMENTROOT=test
#PROJECT_LOGS=logs

#HELLO=World

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages