Best option:
Add DEBUGBAR_ENABLED=false to your .env
This has some advantages over Abdulla Nilam's answer:
Debugbar is totally disabled
You can keep APP_DEBUG=true, hence still keep error details for local development
It is not tracked by git
Navigate to .env and use these commands
APP_DEBUG=false # No error reporting at all
or
DEBUGBAR_ENABLED=false # deguger is disabled but error reporting works
FYI: Once you changed the values on
.envand it didn't reflex, clear the config usingphp artisan config:clearorphp artisan optimize:clear
Useful Links
Remove Laravel Debugbar
- If you want to totally remove the package, then do these steps:
$ composer remove vendor/barryvdh/laravel-debugbar$ composer updateDisable Laravel Debugbar
Option 1: Via Env File
- If you want disable the package, without it getting tracked by Git:
.env fileDEBUGBAR_ENABLED = FALSE
Option 2: Via AppServiceProvider
- From @Ohgodwhy's answer
- FYI: This will be tracked by Git. - @Salam
app/Providers/AppServiceProvider.php
Put this code \Debugbar::disable();
class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        \Debugbar::disable();
    }
}
Enabling/Disabling on run time.
You can enable or disable the debugbar during run time.
Add this into your .env file: 
DEBUGBAR_ENABLED = FALSE
In runtime:
\Debugbar::enable();
\Debugbar::disable();
Or remove everything
composer remove barryvdh/laravel-debugbar
You can execute composer remove barryvdh/laravel-debugbar to permanently remove it.
Note you can also just disable the debug bar if you don't want it:
Just put \Debugbar::disable(); in your AppServiceProvider.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With