Skip to content

Instantly share code, notes, and snippets.

@dam1r89
Created September 9, 2016 12:03
Show Gist options
  • Save dam1r89/8f0d71d3a7c62a26720f0f904fdf48a3 to your computer and use it in GitHub Desktop.
Save dam1r89/8f0d71d3a7c62a26720f0f904fdf48a3 to your computer and use it in GitHub Desktop.
function dq($query){
$sql = $query->toSql();
foreach($query->getBindings() as $key => $binding){
$sql = preg_replace('/\?/', "'$binding'", $sql, 1);
}
dd($sql);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment