imoisey / envbuilder
Builder for .env file
0.1.1
2020-06-10 20:44 UTC
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2025-03-11 15:38:07 UTC
README
Envbuilder is an easy library for building .env files.
Installation
composer require imoisey/envbuilder
Usage
use Imoisey\Envbuilder\EnvBuilder; $envBuilder = new EnvBuilder(); $envBuilder->add('APP_PORT', '5001'); $envBuilder ->add('DB_NAME', 'dbname') ->add('DB_USER', 'dbuser') ->add('DB_PASS', 'dbpass'); $envBuilder->build('.env');
.env:
APP_PORT: 5001 DB_NAME: dbname DB_USER: dbuser DB_PASS: dbpass