Commit 5a34c60c authored by Taylor Otwell's avatar Taylor Otwell

Simplify environment loading.

parent 6980d95c
.env.*
/.idea /.idea
/vendor /vendor
.env
.DS_Store .DS_Store
Thumbs.db Thumbs.db
composer.lock composer.lock
......
<?php <?php
/*
|--------------------------------------------------------------------------
| 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.
|
*/
try
{
Dotenv::load(__DIR__.'/../');
Dotenv::required('APP_ENV');
}
catch (RuntimeException $e)
{
die('Application environment not configured.'.PHP_EOL);
}
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Detect The Application Environment | Detect The Application Environment
...@@ -11,8 +33,7 @@ ...@@ -11,8 +33,7 @@
| |
*/ */
$env = $app->detectEnvironment([ $env = $app->detectEnvironment(function()
{
'local' => ['homestead'], return getenv('APP_ENV');
});
]);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment