Created
November 30, 2018 19:45
-
-
Save pedroufv/42047060a9f7252a6afc905a65a35dd8 to your computer and use it in GitHub Desktop.
show all sql add this code in boot method of appServiceProvider
This file contains 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
DB::listen(function(QueryExecuted $query){ | |
Logger( | |
vsprintf(str_replace('?', '%s', $query->sql), collect($query->bindings)->map(function($binding){ | |
return is_numeric($binding) ? $binding : "'{$binding}'"; | |
})->toArray()) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment