Posts Learn Components new Snippets new Categories Tags About
/

How to Enable and Disable Debug Mode in Laravel

Learn how to enable and disable debug mode in Laravel to view error messages during local development and hide error messages on production

Created on Jul 21, 2021

113 views

In this snippet, you will learn how to enable and disable debug mode in Laravel. Having a debug mode is very important in order to show errors during local development.

During production, the debug mode can also be disabled to prevent any sensitive information from being seen by users.

Enable Debug Mode in Laravel
To enable the debug mode in Laravel, you can set it through the environment configurations ".env" file APP_DEBUG to "true".
APP_NAME="Laravel App"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=https://laravel.test

Disable Debug Mode in Laravel
To disable the debug mode in Laravale, you can just set the APP_DEBUG to "false".
APP_NAME="Laravel App"
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=https://laravel.test

To read more visit the Laravel Configuration Documentation.
new

If you like our tutorial, do make sure to support us with some coffee. We need the juice to write the content during the night 🤙🏻