Laravel How To Enable and Disable Debug Mode Environment

Share this Article
Reading Time: 2 minutes
352 Views

Inside this article we will see the concept i.e Laravel How To Enable and Disable Debug Mode Environment. Article contains the classified information about enabling and disabling debugger model of laravel application.

If you are looking for a solution i.e How to enable and disable Laravel debugger then this article will help you a lot for this. Tutorial is super easy to understand and implement it in your code as well.

Learn More –

Let’s get started.

Laravel Installation

Open terminal and run this command to create a laravel project.

$ composer create-project laravel/laravel myblog

It will create a project folder with name myblog inside your local system.

To start the development server of laravel –

$ php artisan serve

URL: http://127.0.0.1:8000

Assuming laravel already installed inside your system.

Enable & Disable Debugger Mode

You will see .env file inside application. Open it.

Search for APP_DEBUG. By default you will see the value of it. It should be true.

Enable Debug Mode

APP_DEBUG=true

Disable Debug Mode

APP_DEBUG=false

Internally, application uses this environment variable inside app.php. You will find this file inside /config folder.

..

'debug' => (bool) env('APP_DEBUG', false),

..

If APP_DEBUG suppose not available inside .env file then false will be the default application mode.

We hope this article helped you to learn Laravel How To Enable and Disable Debug Mode Environment in a very detailed way.

Buy Me a Coffee

Online Web Tutor invites you to try Skillshike! Learn CakePHP, Laravel, CodeIgniter, Node Js, MySQL, Authentication, RESTful Web Services, etc into a depth level. Master the Coding Skills to Become an Expert in PHP Web Development. So, Search your favourite course and enroll now.

If you liked this article, then please subscribe to our YouTube Channel for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on Twitter and Facebook.

Was this post helpful?

Get PHP Web Development Courses on Offer in just ₹299
Get PHP Web Development Courses on Offer in just ₹299