Level 60
DB::listen(function ($query) {
// $query->sql
// $query->bindings
// $query->time
});
Documentation - https://laravel.com/docs/5.8/database#listening-for-query-events
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
how can i get execution time of query ? thanks
Please or to participate in this conversation.