How to Disable Laravel Debugbar?

The Debugbar package is one of the most essential tools for any Laravel developer. With its simple installation and powerful features, the Debugbar package allows you to quickly and easily keep tabs on your application during development.

By giving you a detailed view of your application’s performance, the Debugbar package helps you optimize your Laravel applications for maximum efficiency. In addition, the Debugbar package also provides a convenient way to monitor your application’s requests and responses.

However, there are times when you may want to disable the Debugbar package. For example, if you are working on a production application, you may not want the extra overhead of the Debugbar package’s features. Additionally, if you are troubleshooting a problem with your application, you may find that the Debugbar package’s detailed logging interferes with your debugging process.

Luckily, disabling the Debugbar package is a simple process. There are 2 ways:

//Add this line to .env file
DEBUGBAR_ENABLED=false

//call Debugbar::disable() in ServiceProvider
class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        \Debugbar::disable();
    }
}

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close