2017 © Pedro Peláez
 

library dotenv-filler

Laravel 5.1 command to create/fill missing fields in .env file based on rules in .env.example file.

image

kduma/dotenv-filler

Laravel 5.1 command to create/fill missing fields in .env file based on rules in .env.example file.

  • Friday, October 21, 2016
  • by kduma
  • Repository
  • 1 Watchers
  • 6 Stars
  • 2,050 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 7 Versions
  • 1 % Grown

The README.md

L5-dotenv-filler

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI, (*1)

Laravel 5.1 command to create/fill missing fields in .env file based on rules in .env.example file., (*2)

Setup

Add the package to the require section of your composer.json and run composer update, (*3)

"kduma/dotenv-filler": "^1.1"

Then add the Service Provider to the providers array in config/app.php:, (*4)

KDuma\DotEnvFiller\DotEnvFillerServiceProvider::class,

Usage

Command syntax is as following:, (*5)

config:env [-o|--overwrite] [-d|--defaults]
  • --overwrite (-o) - Don't skip keys that exists in .env. (will ask if you want to overwrite or not)
  • --defaults (-d) - Ask for defaults. (if you don't use this option command will assume that you want defaults options)

Rules in .env.example

  • APP_KEY=VALUE - it will be written as is.
  • DB_HOST=(TEXT) - it will prompt for input (plaintext).
  • DB_PASSWORD=(PASSWORD) - it will prompt for input (secret).
  • APP_ENV=(local|production) - it will allow to select local or production.
  • APP_DEBUG=(true|false){APP_ENV=local:true|APP_ENV=production:false} - it will allow to select true or false but before, it will sugests an default based on rules.

Sample .env.example

APP_ENV=(local|production)
APP_DEBUG=(true|false){APP_ENV=local:true|APP_ENV=production:false}
APP_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

DB_HOST=(TEXT){APP_ENV=local:localhost}
DB_DATABASE=(TEXT){APP_ENV=local:homestead}
DB_USERNAME=(TEXT){APP_ENV=local:homestead}
DB_PASSWORD=(PASSWORD){APP_ENV=local:secret}

CACHE_DRIVER=(file|database|array){APP_ENV=local:file|APP_ENV=production:file}
SESSION_DRIVER=(file|database|cookie|array){APP_ENV=local:database|APP_ENV=production:database}
QUEUE_DRIVER=(sync|database|beanstalkd){APP_ENV=local:database|APP_ENV=production:database}


SMTP_HOST=(TEXT){APP_ENV=local:mailtrap.io}
SMTP_PORT=(TEXT){SMTP_HOST=mailtrap.io:2525}
SMTP_USERNAME=(TEXT)
SMTP_PASSWORD=(PASSWORD)

NOCAPTCHA_SECRET=(TEXT)
NOCAPTCHA_SITEKEY=(TEXT)

WEBCRON_SECRET=(TEXT|null)
WEBCRON_TIMELIMIT=(TEXT|30|60|null){APP_ENV=local:30|APP_ENV=production:60}
WEBCRON_RUNLIMIT=(TEXT|30|60|null){APP_ENV=local:null|APP_ENV=production:null}

Packagist

View this package on Packagist.org: kduma/dotenv-filler, (*6)

The Versions

21/10 2016

dev-master

9999999-dev

Laravel 5.1 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel command artisan env dotenv

09/06 2015

v1.1.0

1.1.0.0

Laravel 5.1 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel command artisan env dotenv

31/01 2015

v1.0.4

1.0.4.0

Laravel 5 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel command artisan env dotenv

31/01 2015

v1.0.3

1.0.3.0

Laravel 5 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel command artisan env dotenv

31/01 2015

v1.0.2

1.0.2.0

Laravel 5 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel queue cron

31/01 2015

v1.0.0

1.0.0.0

Laravel 5 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel queue cron

31/01 2015

v1.0.1

1.0.1.0

Laravel 5 command to create/fill missing fields in .env file based on rules in .env.example file.

  Sources   Download

MIT

The Requires

 

laravel queue cron