Package Data | |
---|---|
Maintainer Username: | mathiasgrimm |
Maintainer Contact: | mathiasgrimm@gmail.com (Mathias Grimm) |
Package Create Date: | 2016-02-07 |
Package Last Update: | 2016-03-08 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-19 03:00:45 |
Package Statistics | |
---|---|
Total Downloads: | 55,873 |
Monthly Downloads: | 265 |
Daily Downloads: | 22 |
Total Stars: | 80 |
Total Watchers: | 3 |
Total Forks: | 4 |
Total Open Issues: | 3 |
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.
Laravel Env Validator is available via Composer:
{
"require": {
"mathiasgrimm/laravel-env-validator": "1.*"
}
}
// config/app.php
'providers' => [
...
MathiasGrimm\LaravelEnvValidator\ServiceProvider::class,
...
],
php artisan vendor:publish --provider="MathiasGrimm\LaravelEnvValidator\ServiceProvider" --tag="config"
Manually copy the configuration file
vendor/mathiasgrimm/laravel-env-validator/src/config/laravel-env-validator.php
to
config/laravel-env-validator.php
Register Service Provider in bootstrap/app.php
:
...
$app->register(MathiasGrimm\LaravelEnvValidator\LumenServiceProvider::class);
...
Load configuration file in bootstrap/app.php
:
$app->configure('laravel-env-validator');
<?php
// config/laravel-env-validator.php
return [
'SOME_IMPORTANT_VARIABLE' => 'required',
'ANOTHER_IMPORTANT_ONE' => 'required|in:TYPE_A,TYPE_B,TYPE_C',
]
If you discover any security related issues, please email mathiasgrimm@gmail.com instead of using the issue tracker.