I have a PHP application using Laravel, whenever there is an error, the system will open a screen containing the error details with db connection details, the database name even the password. How can I prevent the application from showing this sensitive information.
Thank you
2
Answers
If the APP_DEBUG value in .env is true, all details appear in the error message.
When you have your app in the production mode make
APP_ENV=production
andAPP_DEBUG=FALSE
to prevent Laravel from exposing sensitive information.