Lumen-framework: Lumen 5.2 is always in production mode

Created on 23 May 2016  路  4Comments  路  Source: laravel/lumen-framework

I have a problem with lumen's exception debug output. I have enabled debug mode, but it doesn't seem to work properly.

My config/app.php:

<?php
return [
    'env' => 'local',
    'debug' => true,
    'key' => env('APP_KEY', 'SomeRandomString!!!'),
    'cipher' => 'AES-256-CBC',
    'locale' => env('APP_LOCALE', 'en'),
    'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
];

In bootstrap/app.php i have:

$app->configure('app');

So, i checked - the config file is loaded succesfully.
But when my app throwing an exception lumen just output - "Whoops, looks like something went wrong."
There is no any debug info. Also when i use php artisan migrate i see - "Application In Production!" notice.
What's the problem?

P.S i don't want to use .env config file.

Most helpful comment

In vendor/laravel/lumen-framework/src/Application.php line 134

$env = env('APP_ENV', 'production');

you must use .env to change the env

the same at vendor/laravel/lumen-framework/src/Exceptions/Handler.php line 89

All 4 comments

In vendor/laravel/lumen-framework/src/Application.php line 134

$env = env('APP_ENV', 'production');

you must use .env to change the env

the same at vendor/laravel/lumen-framework/src/Exceptions/Handler.php line 89

@JKair thanks for the answer.

@codercms What did you do? It's not good to change the framework itself.

awesome this fixed my problem too ..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GGNB picture GGNB  路  5Comments

dunice picture dunice  路  3Comments

Andrei-Vakulski picture Andrei-Vakulski  路  3Comments

concept47 picture concept47  路  3Comments

maglor picture maglor  路  3Comments