Skip to content

Instantly share code, notes, and snippets.

@alnutile
Created September 30, 2014 18:23
Show Gist options
  • Save alnutile/64a393c6593572397578 to your computer and use it in GitHub Desktop.
Save alnutile/64a393c6593572397578 to your computer and use it in GitHub Desktop.
<?php
/*
|--------------------------------------------------------------------------
| 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.
|
*/
$env = $app->detectEnvironment(function(){
if(!file_exists(__DIR__ . '/../.env_boot.php'))
{
$env = 'codeship';
}
else
{
$env = require_once(__DIR__ . '/../.env_boot.php');
}
return $env;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment