Skip to content

Instantly share code, notes, and snippets.

@DuckThom
Created January 25, 2015 13:21
Show Gist options
  • Select an option

  • Save DuckThom/c83415835cd2b5f5fb67 to your computer and use it in GitHub Desktop.

Select an option

Save DuckThom/c83415835cd2b5f5fb67 to your computer and use it in GitHub Desktop.
/*
|--------------------------------------------------------------------------
| 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(array(
'local' => array('homestead', '*.local', 'luna-pc'), // If the hostname matches this it will use .env.local.php
'production' => array('luna-server') // if the hostname matches 'luna-server' it will use .env.php
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment