public static function buildFromLaravelConfig()
{
$config = config('laravel-env-validator');
// there is a bug that would not load APP_ENV into $_SERVER or $_ENV
// therefore I had to read based on what was defined in the config file
$env = [];
foreach (array_keys($config) as $variable) {
$env[$variable] = env($variable);
}
$validator = \Validator::make($env, $config);
return static::buildFromValidator($validator);
}