baopham/env-checker

Artisan command to check if all required variables are configured in .env

dev-master 2015-09-13 01:25 UTC

This package is auto-updated.

Last update: 2024-10-24 03:36:48 UTC


README

Artisan command to check if all required variables are configured in .env by checking the .env.example

Usage:

  1. Run
$ composer require baopham/env-checker
  1. Register in your config/app.php:
'providers' => [
    ...
    BaoPham\EnvChecker\EnvCheckerServiceProvider::class,
    ...
];
  1. Update your .env.example to indicate all required variables

  2. Run the command

$ php artisan env:check

Envoy Usage Example

Include this in your Envoy.blade.php:

@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

Requirements:

Laravel 5.1

License:

MIT

Author:

Bao Pham