DB::connection()->enableQueryLog();
$bindings = DB::getQueryLog();
$data = [];
foreach ($bindings as $k=> $b){
$bi = $b['bindings'];
$bi = array_map(function($a){
return '''.$a.''';
},$bi);
$sql = str_replace('?', '%s', $b['query']);
$sql2 = sprintf($sql, ...$bi);
$data[$k] = $sql2;
}
$sql = implode(';',$data);
print_r($sql);exit();