Created
June 19, 2018 15:44
-
-
Save meneguite/64e1622548e8d538aa65ed3072a7d745 to your computer and use it in GitHub Desktop.
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
if (config('api.events.database.debug')) { | |
Event::listen('Illuminate\Database\Events\QueryExecuted', function ($query) { | |
save_log('SQL_LOG', [ | |
'sql' => $query->sql, | |
'bindings' => $query->bindings, | |
'time' => $query->time, | |
], Logger::DEBUG); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment