Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created May 22, 2014 06:27
Show Gist options
  • Save coreymcmahon/f2f27a3119f74d028dd0 to your computer and use it in GitHub Desktop.
Save coreymcmahon/f2f27a3119f74d028dd0 to your computer and use it in GitHub Desktop.
Using a config file to define the environment name in Laravel - http://www.slashnode.com
<?php
// ... etc
// in bootstrap/start.php
$env = $app->detectEnvironment(function ()
{
return require __DIR__.'/environment.php';
});
/**
* Assuming app/environment.php contains the following:
*
* <?php
*
* return 'local';
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment