Simple database profiler

Posted 2 years ago by dmitry.g.ivanov

Hi there!

Sometimes it's needed to check all of your database queries.

You can achieve this in a different ways:

  • listen db queries via DB class;
  • add separate method in your AppServiceProvider;
  • use one of the extensions or packages, for example, Laravel DebugBar;
  • etc;

It's pretty simple task, really. But, that copy-paste process, or using of the heavy packages is boring.

I've created very simple package just for db profiling:

https://packagist.org/packages/illuminated/db-profiler

https://github.com/dmitry-ivanov/laravel-db-profiler

It enabled only for local environment. It supports http and console applications both.

Use vvv request param, or -vvv option to turn it on. Please, check readme for more details.

Hope it would be useful for someone!

Thanks and have a great day!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.