skip to Main Content

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

3

Answers


  1. Have you added

    use IlluminateSupportFacadesConfig;
    

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

    dd(config('app.debug'));
    
    Login or Signup to reply.
  2. make sure there’re no duplicate keys for debug

    Login or Signup to reply.
  3. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search