Disable laravel error screen

When you working with laravel, on any error you will inbuilt laravel error screen. This is debugger screen which is inbuilt functionality of laravel. But there is configuration in laravel to disable laravel error screen or debugger screen on production. The inbuilt laravel error screen looks like below on any error.

This should not be allowed on production for security reasons. So we should disable laravel error screen. To disable laravel error screen we just need to set variable to false in .env file. So open your .env file in editor and set APP_DEBUG=false. Default it’s value is true.

// Default is true so set it to false.
APP_DEBUG=false

After done your screen will looks like below on any error. Just use this for production to hide debug info. On development use default so we can catch and debug code.

For more information about errors follow Laravel Errors.

Cheers! happy coding!

Adam Brown
Please follow and like us:

Leave a Comment