0

Is there any way to disable the debugbar by default and enable it dynamically in the middleware?

When in AppServiceProvider boot I add Debugbar::disable(); and then in the middleware in the condition I add Debugbar::enable(); it does not work.

Replacing config('debugbar.enabled') doesn't work either.

Is it possible to do?

phanaz
  • 1,188
  • 8
  • 17
  • Does this answer your question? [How to safely remove Laravel Debugbar](https://stackoverflow.com/questions/48220709/how-to-safely-remove-laravel-debugbar) – RevNoah Feb 06 '23 at 15:25

0 Answers0