Matomo Analytics

When you want to deploy your Laravel app to a live environment, you want to ensure no one can see any debug message as this may contain information about your application that you do not want to spread.

First, ensure your APP_DEBUG is set to false inside your .env file. Also, change the APP_ENV from local to production. This makes sure your user won't be able to read any debug messages when an error is thrown.

If you're using third-party packages to debug your application make sure you disable them, or only make them available for yourself (by checking IP or whatever).

For example, if you're using the Debugbar package make sure you mark DEBUGBAR_ENABLED to false so the bar will not show itself.

12 August 2018 (last updated 2 months ago)


Written by Dennis Smink

Dennis brings over 6 years of hands-on experience in server management, specializing in optimizing web services for scalability and security.

Back to Laravel

Start free trial