Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18883

Laravel: "debug" config dose not change

Repreduce:

In file config/app.php I changed following code

'debug' => true,

After run php artisan config:cache command, I executed dd(Config::get('app.debug'))

Expected:

Get true

Actual:

Get false


You should to know when I changed other config, I got that except debug

Upvotes: 2

Views: 131

Answers (3)

Atefeh 1999
Atefeh 1999

Reputation: 36

Make sure your APP_ENV is development or testing in .env file and run again following the command

php artisan config:cache

Like:

APP_ENV=development

Upvotes: 2

MohaMed HaMdy
MohaMed HaMdy

Reputation: 24

make sure there're no duplicate keys for debug

Upvotes: 0

Haris
Haris

Reputation: 81

Have you added

use Illuminate\Support\Facades\Config;

at top of file. There is another way to check this, that is

dd(config('app.debug'));

Upvotes: 1

Related Questions