2017 © Pedro Peláez
 

library laravel-env-validator

Laravel Validator for the .env file

image

mathiasgrimm/laravel-env-validator

Laravel Validator for the .env file

  • Tuesday, March 8, 2016
  • by mathiasgrimm
  • Repository
  • 2 Watchers
  • 78 Stars
  • 12,869 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 3 Open issues
  • 15 Versions
  • 11 % Grown

The README.md

Laravel Env Validator

Author Latest Version Total Downloads, (*1)

Laravel Env Validator is meant to validate your .env file in order to avoid any unexpected behaviour for not having properly defined some variable or value., (*2)

Highlights

  • Make sure you don't go live without all required .env variables and without the correct values
  • Validate you env variables using the Laravel Validator by simple defining rules in a configuration file
  • Working in teams becomes easier

Installation

Laravel Env Validator is available via Composer:, (*3)

{
    "require": {
        "mathiasgrimm/laravel-env-validator": "1.*"
    }
}

Setup

Laravel

Register Service Provider

// config/app.php

'providers' => [
    ...
    MathiasGrimm\LaravelEnvValidator\ServiceProvider::class,
    ...
],

Publish configuration file

php artisan vendor:publish --provider="MathiasGrimm\LaravelEnvValidator\ServiceProvider" --tag="config"

Lumen

Manually copy the configuration file, (*4)

vendor/mathiasgrimm/laravel-env-validator/src/config/laravel-env-validator.php

to, (*5)

config/laravel-env-validator.php

Register Service Provider in bootstrap/app.php:, (*6)

...
$app->register(MathiasGrimm\LaravelEnvValidator\LumenServiceProvider::class);
...

Load configuration file in bootstrap/app.php:, (*7)

$app->configure('laravel-env-validator');

Example configuration file

<?php
// config/laravel-env-validator.php

return [
    'SOME_IMPORTANT_VARIABLE' => 'required',
    'ANOTHER_IMPORTANT_ONE'   => 'required|in:TYPE_A,TYPE_B,TYPE_C',
]

Screenshot

Command Line

Screenshot, (*8)

Browser

Screenshot, (*9)

Security

If you discover any security related issues, please email mathiasgrimm@gmail.com instead of using the issue tracker., (*10)

Credits

The Versions

08/03 2016

dev-master

9999999-dev

Laravel Validator for the .env file

  Sources   Download

08/03 2016

v1.1.0

1.1.0.0

Laravel Validator for the .env file

  Sources   Download

18/02 2016

v1.0.12

1.0.12.0

Laravel Validator for the .env file

  Sources   Download

16/02 2016

v1.0.11

1.0.11.0

Laravel Validator for the .env file

  Sources   Download

16/02 2016

v1.0.10

1.0.10.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.9

1.0.9.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.8

1.0.8.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.7

1.0.7.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.6

1.0.6.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.5

1.0.5.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.4

1.0.4.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.3

1.0.3.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.2

1.0.2.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.1

1.0.1.0

Laravel Validator for the .env file

  Sources   Download

14/02 2016

v1.0.0

1.0.0.0

Laravel Validator for the .env file

  Sources   Download