Skip to content

Commit

Permalink
Tweak environment file settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 10, 2014
1 parent 714f6a5 commit ef855c1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bootstrap/environment.php
Expand Up @@ -11,17 +11,14 @@
|
*/

try
if (file_exists(__DIR__.'/.env'))

This comment has been minimized.

Copy link
@v-jacob

v-jacob Oct 10, 2014

are .env files going to be stored in the bootstrap folder? if they are going to be in the base folder then we should look for it in if (file_exists(__DIR__.'/../.env')), right?

{
Dotenv::load(__DIR__.'/../');

This comment has been minimized.

Copy link
@sschlein

sschlein Oct 10, 2014

Looks like you check for the .env file in the bootstrap directory and then point the load function in the main directory.

Dotenv::required('APP_ENV');
}
catch (RuntimeException $e)
{
die('Application environment not configured.'.PHP_EOL);
//Dotenv::required('APP_ENV');
}


/*
|--------------------------------------------------------------------------
| Detect The Application Environment
Expand All @@ -35,5 +32,5 @@

$env = $app->detectEnvironment(function()
{
return getenv('APP_ENV');
return getenv('APP_ENV') ?: 'production';
});

0 comments on commit ef855c1

Please sign in to comment.