Posts Learn Components Snippets Categories Tags Tools 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

456 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.

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

new

PostSrc Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that are right for your project.

View Components

Sponsors 👑

+ Add Yours
)