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
public static function getQueries(Builder $builder) { $addSlashes = str_replace('?', "'?'", $builder->toSql()); return vsprintf(str_replace('?', '%s', $addSlashes), $builder->getBindings()); }