are these entries in config/app.php stock or have you edited them?
debug = false is not working
I set my .env as follows:
APP_ENV=production
APP_DEBUG=false
APP_LOG_LEVEL=info
But it stills shows me debug messages and trace in API. Why is that?
they are from .env config/app.php is left as it is during installation (it's taking all values from .env file)
use php artisan config:clear
This will clear the cached variables and use the new ones.
Unfortunately not working
try php artisan config:cache
that should clear and then recache.
Still not working this is what I get. This "debug" part is killing me
{
"error": {
"message": "Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ']'",
"status_code": 500,
"debug": {
"line": 103,
"file": "E:\\xampp\\htdocs\\app\\Api\\V1\\Controllers\\Messages\\MessageController.php",
"class": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",
"trace": [
"#0 E:\\xampp\\htdocs\\vendor\\composer\\ClassLoader.php(322): Composer\\Autoload\\includeFile('E:\\\\xampp\\\\htdocs...')",
"#1 [internal function]: Composer\\Autoload\\ClassLoader->loadClass('App\\\\Api\\\\V1\\\\Cont...')",
"#2 [internal function]: spl_autoload_call('App\\\\Api\\\\V1\\\\Cont...')",
]
}
}
}
If php artisan config:cache still not working, simple try to restart your server. Maybe you should try to change that variable manual in app.php.
I've tried all of that :/
Are you running on Homestead? If so destroy the box and re-provision.
Are you still having that trouble after 3 years? I am on Laravel 7.x and have the same problem. Only thing that works for me is to edit the \config\app.php.
Change 'debug' => env('APP_DEBUG', false), to 'debug'=false,
and then in console type
'php artisan config:cache'.
If anyone have solutions to make the .env working, I am happy.
it works perfectly as it is.
don't cache config in development. use config:clear instead @johnnrr
I hit this error and I tried everything from the top to this very reply by @snapey. Why was it not the first reply?
The solution is to run config: clear nothing else.
php artisan config:clear
I used Laravel 9 and have the same issue. And "php artisan config:clear" does not help.
@mzamirani Please make a new thread so we can try helping you out. Chances are that the original poster, does not have the same issue 5 years later
@Sinnbeck Thanks to reply, but how make a new thread? How start? in which page?
@mzamirani Go to this page and click "New discussion" https://laracasts.com/discuss
sorry, but I can't. After writing all (Title + tekst) get : You have ventured into 404 space. (Page Not Found)
@mzamirani Try just making a new one but only add a test text ? You can edit it afterwards
Please or to participate in this conversation.