Laravel-debugbar: Easy way to disable debugbar on certain routes / groups / controllers

Created on 6 Sep 2017  路  3Comments  路  Source: barryvdh/laravel-debugbar

Is there an easy way to completely disable debugbar for certain routes either via routes or controller etc? We need to disable in order for us to test properly our API functionality and for those we def do not want debugbar added to every response.

For example android oauth completely breaks when there is debugbar html on the response we are sending to the android clients.

So suggestion would be something along the lines of

Debugbar::disable();

Most helpful comment

Ok so after a lot of research it seems that by using

app('debugbar')->disable();

it'll actually disable properly without issues. I just used it on Laravel 5.5 and worked like a charm.

All 3 comments

Ok so after a lot of research it seems that by using

app('debugbar')->disable();

it'll actually disable properly without issues. I just used it on Laravel 5.5 and worked like a charm.

Hello, I also use app('debugbar')->deisable(); and it work fine for me!
Thank's @Megachill

Hello, I also use app('debugbar')->deisable(); and it work fine for me!
Thank's @Megachill

I think you tried to say disable()(misspelling fixed) :)

Worked for me too, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

coderdiaz picture coderdiaz  路  4Comments

kjhatis picture kjhatis  路  5Comments

innerdev picture innerdev  路  5Comments

ddmo picture ddmo  路  3Comments

mnameghi picture mnameghi  路  6Comments