dimanche 4 octobre 2015

Laravel 5 environment is always 'Production' when it is infact 'Local'

I am trying to set up two environments: local and production.

So far, I have added a bootstrap/environment.php file which is:

$env = $app->detectEnvironment(array(
    'local' => array('Ben'),
    'staging' => array('staging.domain.org'),
    'production' => array('domain.org'),
));

and two .env files - .local.env and .production.envwith the different environment variables such as: APP_ENV=local and APP_DEBUG=true.

My laptop's hostname is called Ben.

The problem I'm having is the php artisan env always returns Production and thus, I can't load my application.

Also, within the production.env file, if I change the APP_DEBUG variable to true or false, it doesn't make a difference on the web application - it always returns "Whoops, looks like something went wrong.".

Any help would be greatly appreciated. Thank you.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire