This commit is contained in:
James Cole
2018-04-27 06:26:37 +02:00
parent 9026c9d6f1
commit a9dd8eb9e7
7 changed files with 41 additions and 26 deletions

View File

@@ -36,6 +36,21 @@ declare(strict_types=1);
bcscale(12);
/**
* @param string $key
* @param null $default
*
* @return mixed|null
*/
function envNonEmpty(string $key, $default = null)
{
$result = env($key, $default);
if (is_string($result) && $result === '') {
$result = $default;
}
return $result;
}
$app = new Illuminate\Foundation\Application(
realpath(__DIR__ . '/../')