FNGR2911's avatar

Show response and query time

Hi everybody!

Is there a way to show some response and query time statistics when running a local server (php artisan serve) and then go to a route i.e. /home? just want to know how long the server needs for database queries ;)

Thank you!

0 likes
9 replies
FNGR2911's avatar

cool, thank you both! I'm sure I'll find a solution :)

khaledSMQ's avatar

try this

 DB::listen(function ($query) {
            // $query->sql
            // $query->bindings
            // $query->time
        });
Ftoi's avatar

write you solution and make Best Answer to help the other :)

dawiyo's avatar

Laravel Debugbar is great, but I prefer itsgoingd/clockwork. It shows the same amount of information, but rather than injecting a bar onto the page, this shows all of the info in a Chrome Devtools tab. Much cleaner in my opinion.

Please or to participate in this conversation.