Last active
May 20, 2020 19:16
-
-
Save hasinhayder/116959f6d1a2df91a0cb11eb515fb569 to your computer and use it in GitHub Desktop.
display all the queries being executed in laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* add a listener to display all the queries being executed in laravel */ | |
DB::listen( function ( $query ) { | |
var_dump( $query->sql ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment