Files
nl-admin-api/bootstrap/environment.php

37 lines
1010 B
PHP
Raw Normal View History

<?php
2014-10-08 17:12:10 -05:00
/*
|--------------------------------------------------------------------------
| Load Environment Variables
|--------------------------------------------------------------------------
|
| Next we will load the environment variables for the application which
| are stored in the ".env" file. These variables will be loaded into
| the $_ENV and "putenv" facilities of PHP so they stay available.
|
*/
2014-10-10 08:33:05 -05:00
if (file_exists(__DIR__.'/.env'))
2014-10-08 17:12:10 -05:00
{
Dotenv::load(__DIR__.'/../');
2014-10-10 08:33:05 -05:00
//Dotenv::required('APP_ENV');
2014-10-08 17:12:10 -05:00
}
2014-10-10 08:33:05 -05:00
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
|
*/
2014-10-08 17:12:10 -05:00
$env = $app->detectEnvironment(function()
{
2014-10-10 08:33:05 -05:00
return getenv('APP_ENV') ?: 'production';
2014-10-08 17:12:10 -05:00
});