Home / Snippets / How to Enable and Disable Debug Mode in Laravel
How to Enable and Disable Debug Mode in Laravel cover

How to Enable and Disable Debug Mode in Laravel

471

3 years ago

0 comments

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.
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

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

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this