diff --git a/src/Helpers/DatabaseHelper.php b/src/Helpers/DatabaseHelper.php index 457204d..1f8e0c9 100644 --- a/src/Helpers/DatabaseHelper.php +++ b/src/Helpers/DatabaseHelper.php @@ -17,6 +17,11 @@ class DatabaseHelper */ public function buildRawSql(Connection $db, string $sql, array $bindings = []): string { + $grammar = $db->getQueryGrammar(); + if (method_exists($grammar, 'substituteBindingsIntoRawSql')) { + return $grammar->substituteBindingsIntoRawSql($sql, $bindings); + } + $escapedBindings = []; foreach ($db->prepareBindings($bindings) as $binding) { if ($binding === null) {