I have some query that I need to pass to another query using query builder
$query = DB::table(\'table\')->whereIn(\'some_field\', [1,2,30])->toSql(); Mode
You can do something like this:
$escapedBindings = array(); foreach($query->getBindings() as $item) {$escapedBindings[] = '"'.$item.'"';} $sql_with_bindings = Str::replaceArray('?', $escapedBindings, $query->toSql());