dev-master
9999999-devArtisan command to check if all required variables are configured in .env
MIT
The Requires
The Development Requires
by Bao Pham
Wallogit.com
2017 © Pedro Peláez
Artisan command to check if all required variables are configured in .env
Artisan command to check if all required variables are configured in .env by checking the .env.example, (*1)
1) Run, (*2)
$ composer require baopham/env-checker
2) Register in your config/app.php:, (*3)
'providers' => [
...
BaoPham\EnvChecker\EnvCheckerServiceProvider::class,
...
];
3) Update your .env.example to indicate all required variables, (*4)
4) Run the command, (*5)
$ php artisan env:check
Include this in your Envoy.blade.php:, (*6)
@task('deploy_dev', ['on' => 'dev'])
cd /home/forge/app
git fetch
git checkout origin/dev -- config/envchecker.php
php artisan env:check
// If the check above fails, the script stops here.
// else, it continues (you can continue to pull the latest code and deploy)
@endtask
Laravel 5.1, (*7)
MIT, (*8)
Bao Pham, (*9)
Artisan command to check if all required variables are configured in .env
MIT