Skip to content

Instantly share code, notes, and snippets.

@jamesmills
Last active December 29, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmills/7638596 to your computer and use it in GitHub Desktop.
Save jamesmills/7638596 to your computer and use it in GitHub Desktop.
Local Environment for Laravel

On Mac:

NOTE: Since updating my mac to OSX 10.9 (Mavericks) my local enviroment was not working. Turns out the hostname has changed.

Open Terminal and run hostname.

Open bootstrap/start.php and add $env = $app->detectEnvironment(array( 'local' => array('YOUR-HOSTNAME'), ));

Create new folder app/config/local

Copy anything you want from app/config into app/config/local and when running your application locally these local settings will overwrite the production settings.

To get curent Environment use App::environment();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment