-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queries in providers #1492
Comments
Change providers priority order |
What do you mean? Actually, I didn't add any debugbar provider. It just works. |
that is due to laravel autodiscover |
I understand, but it's set up out of the box |
I have done:
But I still don't see this sql-request in the Queries tab of DebugBar =( Where am I in the wrong? |
Dont add it to config/app.php, try adding this on AppServiceProvider boot first line if(class_exists(\Barryvdh\Debugbar\ServiceProvider::class)){
$this->app->register(new \Barryvdh\Debugbar\ServiceProvider($this->app));
} |
Unfortunately, it doesn't help =(
and I tried DB::table('user')->where('id', 1)->first(); in another service provider down the queue. It doesn't work, 0 queries |
no solution for this yet? having the same issue :( |
It doesn't seem like a bug
You could force the debugbar boot in $this->app->make(\Barryvdh\Debugbar\LaravelDebugbar::class)->boot();
// After this line debugbar starts collecting
DB::table('user')->where('id', 1)->first(); But I don't know what disadvantages it would bring, maybe some collector does not register correctly, you would have to test it |
Thanks, this is true, this is not a bug since in my case all queries are being executed at the app's boot time prior to Debugbar booting, and this solution helps a lot, thanks! |
There is still no config option to setup the priority without modifying |
Hi! The package doesn't show sql queries which are run from providers. Sometimes it's inconvenience. Is it possible to fix this?
The text was updated successfully, but these errors were encountered: