Simplified env detection closure
This commit is contained in:
+2
-6
@@ -25,13 +25,9 @@ $app = new Illuminate\Foundation\Application;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$env = $app->detectEnvironment(function() {
|
$env = $app->detectEnvironment(function() {
|
||||||
// Take care of Heroku deployment for us.
|
|
||||||
if ($envName = getenv('ENV')) {
|
|
||||||
return $envName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Always fall back to local.
|
// Set the environment if set, otherwise it's local
|
||||||
return 'local';
|
return getenv('ENV') ?: 'local';
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user