diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 7d01d5e..8741a6b 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -25,7 +25,7 @@ public function boot() { Log::info('============ URL: '.request()->fullUrl().' ==============='); DB::listen(function (QueryExecuted $query) { - $sqlWithPlaceholders = str_replace('?', '%s', $query->sql); + $sqlWithPlaceholders = str_replace(['?','%'], ['%s','%%'], $query->sql); $bindings = $query->connection->prepareBindings($query->bindings); $pdo = $query->connection->getPdo();