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
If you want to get an executed query including bindings from the query log:
\DB::enableQueryLog(); \DB::table('table')->get(); dd(str_replace_array('?', \DB::getQueryLog()[0]['bindings'], \DB::getQueryLog()[0]['query']));