Monthly Archives: November 2014

Laravel 5 – Environment gotcha

Out of the box, laravel 5 is set to production environment.

If you use homestead for your development, you are going to have a lot of headache unless you set the environment to local.

The documentation is not clear on how to do this.

In the root folder, create a file within bootstrap/

environment.php

<php
$env = $app->detectEnvironment(function()
{
    return getenv('APP_ENV') ?: 'development';
});
?>

This is the correct way to set your environment to local, and will allow you to process your migrations as you would expect them.